Cleaner output while running tests

This commit is contained in:
Lucien Cartier-Tilet 2020-07-12 12:24:00 +02:00
parent 144771a2c0
commit bb9d8703f3
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
2 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ mod tests {
#[test]
fn write_settings() {
let s = settings::Settings::new();
let path = std::path::Path::new("test.yaml");
let path = std::path::Path::new("settings.yaml");
let settings = r#"---
version: "1"
categories: {}
@ -104,7 +104,7 @@ rules: []"#;
#[test]
fn read_settings() {
let s1 = settings::Settings::new();
let path = std::path::Path::new("test.yml");
let path = std::path::Path::new("settings.yml");
s1.export(&path).unwrap();
let s2 = settings::Settings::import(&path).unwrap();
assert_eq!(s1, s2);

View File

@ -274,13 +274,13 @@ impl Settings {
/// let s = Settings::new();
///
/// // Export to JSON
/// let path_json = Path::new("./output.json");
/// let path_json = Path::new("settings.json");
/// s.export(&path_json).unwrap();
///
/// // Export to Yaml, both ".yml" and ".yaml" work
/// let path_yaml = Path::new("./output.yaml");
/// let path_yaml = Path::new("settings.yaml");
/// s.export(&path_yaml).unwrap();
/// let path_yml = Path::new("./output.yml");
/// let path_yml = Path::new("settings.yml");
/// s.export(&path_yml).unwrap();
/// ```
///