diff --git a/src/tests/mod.rs b/src/tests/mod.rs index e0557e4..8cb4175 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -11,23 +11,7 @@ use crate::{ mod config; mod init; - -mod template { - use super::*; - - #[test] - fn expand_should_substitute_values() { - //given - let template = "pre{param1}mid{param2}post"; - let params = HashMap::from([("param1", "-v1-"), ("param2", "-v2-")]); - - //when - let result = crate::template::expand(template, params); - - //then - assert_eq!(result, "pre-v1-mid-v2-post"); - } -} +mod template; pub(crate) mod given { use super::*; diff --git a/src/tests/template.rs b/src/tests/template.rs new file mode 100644 index 0000000..74f3519 --- /dev/null +++ b/src/tests/template.rs @@ -0,0 +1,14 @@ +use super::*; + +#[test] +fn expand_should_substitute_values() { + //given + let template = "pre{param1}mid{param2}post"; + let params = HashMap::from([("param1", "-v1-"), ("param2", "-v2-")]); + + //when + let result = crate::template::expand(template, params); + + //then + assert_eq!(result, "pre-v1-mid-v2-post"); +}