diff options
Diffstat (limited to 'tests/file.rs')
-rw-r--r-- | tests/file.rs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/file.rs b/tests/file.rs index 04a7361..5f49e7f 100644 --- a/tests/file.rs +++ b/tests/file.rs @@ -5,7 +5,9 @@ use config::*; #[test] fn test_file_not_required() { let mut c = Config::default(); - let res = c.merge(File::new("tests/NoSettings", FileFormat::Yaml).required(false)); + let res = c.merge( + File::new("tests/NoSettings", FileFormat::Yaml).required(false), + ); assert!(res.is_ok()); } @@ -16,15 +18,17 @@ fn test_file_required_not_found() { let res = c.merge(File::new("tests/NoSettings", FileFormat::Yaml)); assert!(res.is_err()); - assert_eq!(res.unwrap_err().to_string(), - "configuration file \"tests/NoSettings\" not found" - .to_string()); + assert_eq!( + res.unwrap_err().to_string(), + "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(); + 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)); @@ -36,9 +40,10 @@ fn test_file_auto_not_found() { let res = c.merge(File::with_name("tests/NoSettings")); assert!(res.is_err()); - assert_eq!(res.unwrap_err().to_string(), - "configuration file \"tests/NoSettings\" not found" - .to_string()); + assert_eq!( + res.unwrap_err().to_string(), + "configuration file \"tests/NoSettings\" not found".to_string() + ); } #[test] |