diff options
author | Tim Oram <dev@mitmaro.ca> | 2021-07-01 22:02:47 -0230 |
---|---|---|
committer | Tim Oram <dev@mitmaro.ca> | 2021-07-05 16:27:53 -0230 |
commit | bd700d6dde79a8485780c8c5e416d157a997324a (patch) | |
tree | a0bcd00d3c459e5952b009ceb99c607d3e790dd0 | |
parent | ea31e8e2919408fc8e4123cc63cc5aa18269b60c (diff) |
Move handle_event_test to components module
The handle_event_test utility function was only used in the components
module, so move it to that module and remove the dependency on module.
-rw-r--r-- | src/components/choice/tests.rs | 2 | ||||
-rw-r--r-- | src/components/help/tests.rs | 2 | ||||
-rw-r--r-- | src/components/mod.rs | 3 | ||||
-rw-r--r-- | src/components/testutil.rs (renamed from src/module/testutil/handle_event_test.rs) | 0 | ||||
-rw-r--r-- | src/module/testutil/mod.rs | 3 |
5 files changed, 6 insertions, 4 deletions
diff --git a/src/components/choice/tests.rs b/src/components/choice/tests.rs index 87629e5..1c7cf2e 100644 --- a/src/components/choice/tests.rs +++ b/src/components/choice/tests.rs @@ -3,7 +3,7 @@ use rstest::rstest; use view::assert_rendered_output; use super::*; -use crate::module::testutil::handle_event_test; +use crate::components::testutil::handle_event_test; #[derive(Clone, Debug, PartialEq)] pub enum TestAction { diff --git a/src/components/help/tests.rs b/src/components/help/tests.rs index b197fca..a0aeb8c 100644 --- a/src/components/help/tests.rs +++ b/src/components/help/tests.rs @@ -3,7 +3,7 @@ use rstest::rstest; use view::assert_rendered_output; use super::*; -use crate::module::testutil::handle_event_test; +use crate::components::testutil::handle_event_test; #[test] fn empty() { diff --git a/src/components/mod.rs b/src/components/mod.rs index b1ba9bf..7bcb88a 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -2,3 +2,6 @@ pub mod choice; pub mod confirm; pub mod edit; pub mod help; + +#[cfg(test)] +mod testutil; diff --git a/src/module/testutil/handle_event_test.rs b/src/components/testutil.rs index 4545774..4545774 100644 --- a/src/module/testutil/handle_event_test.rs +++ b/src/components/testutil.rs diff --git a/src/module/testutil/mod.rs b/src/module/testutil/mod.rs index 74aaea7..3eceb57 100644 --- a/src/module/testutil/mod.rs +++ b/src/module/testutil/mod.rs @@ -1,4 +1,3 @@ mod assert_process_result; -mod handle_event_test; -pub use self::{assert_process_result::_assert_process_result, handle_event_test::handle_event_test}; +pub use self::assert_process_result::_assert_process_result; |