diff options
-rw-r--r-- | tests/file.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/file.rs b/tests/file.rs index a1b7506..4dba71f 100644 --- a/tests/file.rs +++ b/tests/file.rs @@ -20,3 +20,12 @@ fn test_file_required_not_found() { "configuration file \"tests/NoSettings\" not found" .to_string()); } + +#[test] +fn test_file_auto() { + let mut c = Config::default(); + c.merge(File::with_name("tests/Settings-production")).unwrap(); + + assert_eq!(c.get("debug").ok(), Some(false)); + assert_eq!(c.get("production").ok(), Some(true)); +} |