Cleaner output while running tests
This commit is contained in:
parent
144771a2c0
commit
bb9d8703f3
@ -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);
|
||||
|
@ -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();
|
||||
/// ```
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user