diff options
author | Ryan Leckey <leckey.ryan@gmail.com> | 2017-07-30 13:20:36 -0700 |
---|---|---|
committer | Ryan Leckey <leckey.ryan@gmail.com> | 2017-07-30 13:20:36 -0700 |
commit | 14224be23dc2f253a240b85214927d97e1160669 (patch) | |
tree | 6f5b02b26aef5cf37bb14f32b9048165b67109ce /tests/file.rs | |
parent | 71f4b182d1e56febda64bd620ae0e0f65de333cd (diff) |
Remove ConfigResult; close #36
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] |