(dir: &TempDir)
| 78 | use tempfile::TempDir; |
| 79 | |
| 80 | fn setup_test_files(dir: &TempDir) -> (String, String) { |
| 81 | let json_path = dir.path().join("config.json"); |
| 82 | let toml_path = dir.path().join("config.toml"); |
| 83 | |
| 84 | fs::write(&json_path, r#"{"test": "json_value"}"#).unwrap(); |
| 85 | fs::write(&toml_path, r#"test = "toml_value""#).unwrap(); |
| 86 | |
| 87 | ( |
| 88 | json_path.to_str().unwrap().to_string(), |
| 89 | toml_path.to_str().unwrap().to_string(), |
| 90 | ) |
| 91 | } |
| 92 | |
| 93 | #[test] |
| 94 | fn test_load_config_file_json() { |