summaryrefslogtreecommitdiffstats
path: root/tests/file_yaml.rs
diff options
context:
space:
mode:
authorRadosław Kot <rdkt13@gmail.com>2021-04-24 19:44:27 +0200
committerRadosław Kot <rdkt13@gmail.com>2021-05-08 17:43:16 +0200
commit98662dd899d4eaab5dc2da07d5bb658960b588a6 (patch)
treec7513c9038ee817c62e444ff02507bca2da363bc /tests/file_yaml.rs
parent82d23c76a8637360e03c0b43d9a1c0c26d820d9f (diff)
Modify tests to use both ConfigBuilder and Config
Diffstat (limited to 'tests/file_yaml.rs')
-rw-r--r--tests/file_yaml.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/file_yaml.rs b/tests/file_yaml.rs
index b2746cd..645829a 100644
--- a/tests/file_yaml.rs
+++ b/tests/file_yaml.rs
@@ -35,11 +35,9 @@ struct Settings {
}
fn make() -> Config {
- let mut c = Config::default();
- c.merge(File::new("tests/Settings", FileFormat::Yaml))
- .unwrap();
-
- c
+ let mut c = Config::builder();
+ c.add_source(File::new("tests/Settings", FileFormat::Yaml));
+ c.build().unwrap()
}
#[test]
@@ -68,8 +66,9 @@ fn test_file() {
#[test]
fn test_error_parse() {
- let mut c = Config::default();
- let res = c.merge(File::new("tests/Settings-invalid", FileFormat::Yaml));
+ let mut c = Config::builder();
+ c.add_source(File::new("tests/Settings-invalid", FileFormat::Yaml));
+ let res = c.build();
let path_with_extension: PathBuf = ["tests", "Settings-invalid.yaml"].iter().collect();