Skip to content

Commit 20fabc4

Browse files
committed
Move render testutils to test_helpers
1 parent 85fc458 commit 20fabc4

27 files changed

+927
-869
lines changed

src/components/choice/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ use super::*;
44
use crate::{
55
assert_rendered_output,
66
input::StandardEvent,
7-
view::testutil::{with_view_state, AssertRenderOptions},
7+
test_helpers::assertions::assert_rendered_output::AssertRenderOptions,
8+
view::testutil::with_view_state,
89
};
910

1011
#[derive(Clone, Debug, PartialEq)]

src/components/confirm/tests.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use super::*;
44
use crate::{
55
assert_rendered_output,
66
input::StandardEvent,
7-
test_helpers::create_test_keybindings,
8-
view::testutil::AssertRenderOptions,
7+
test_helpers::{assertions::assert_rendered_output::AssertRenderOptions, create_test_keybindings},
98
};
109

1110
#[test]

src/components/edit/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::*;
2-
use crate::{assert_rendered_output, view::testutil::AssertRenderOptions};
2+
use crate::{assert_rendered_output, test_helpers::assertions::assert_rendered_output::AssertRenderOptions};
33

44
#[test]
55
fn with_before_and_after_build() {

src/components/shared/editable_line.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ mod tests {
209209
use super::*;
210210
use crate::{
211211
assert_rendered_output,
212-
view::{testutil::AssertRenderOptions, ViewData, ViewLine},
212+
test_helpers::assertions::assert_rendered_output::AssertRenderOptions,
213+
view::{ViewData, ViewLine},
213214
};
214215

215216
macro_rules! view_data_from_editable_line {

src/modules/confirm_abort.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ mod tests {
6363
assert_results,
6464
input::{KeyCode, StandardEvent},
6565
process::Artifact,
66+
test_helpers::assertions::assert_rendered_output::AssertRenderOptions,
6667
testutil::module_test,
67-
view::testutil::AssertRenderOptions,
6868
};
6969

7070
fn create_confirm_abort(todo_file: TodoFile) -> ConfirmAbort {

src/modules/list/tests/search.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use crate::{
55
assert_results,
66
process::Artifact,
77
render_line,
8+
test_helpers::assertions::assert_rendered_output::AssertRenderOptions,
89
testutil::module_test,
9-
view::testutil::AssertRenderOptions,
1010
};
1111

1212
#[test]

src/modules/list/tests/toggle_break.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::{
44
assert_rendered_output,
55
testutil::module_test,
66
todo_file::{Action::Pick, ParseError},
7-
view::testutil::LinePattern,
87
};
98

109
#[test]

src/modules/list/tests/visual_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::{
66
input::KeyCode,
77
process::Artifact,
88
render_line,
9+
test_helpers::assertions::assert_rendered_output::AssertRenderOptions,
910
testutil::module_test,
10-
view::testutil::AssertRenderOptions,
1111
};
1212

1313
fn render_options() -> AssertRenderOptions {

src/modules/show_commit/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ use crate::{
1010
process::Artifact,
1111
render_line,
1212
test_helpers::{
13+
assertions::assert_rendered_output::AssertRenderOptions,
1314
builders::{CommitBuilder, CommitDiffBuilder, FileStatusBuilder},
1415
with_temp_repository,
1516
},
1617
testutil::module_test,
17-
view::{testutil::AssertRenderOptions, ViewLine},
18+
view::ViewLine,
1819
};
1920

2021
fn create_show_commit(config: &Config, repository: Repository, todo_file: TodoFile) -> ShowCommit {

src/test_helpers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub(crate) mod assertions;
12
pub(crate) mod builders;
23
mod create_commit;
34
mod create_event_reader;

0 commit comments

Comments
 (0)