Skip to content

Commit

Permalink
test: clean up .test.mise.toml file
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed May 18, 2024
1 parent feeaf8f commit c41e0a3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/config/config_file/mise_toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -897,12 +897,13 @@ mod tests {
)
.unwrap();
let cf = MiseToml::from_file(&p).unwrap();
let dump = cf.dump().unwrap();
let env = parse_env(file::read_to_string(&p).unwrap());

assert_debug_snapshot!(env, @r###""foo=bar""###);
let cf: Box<dyn ConfigFile> = Box::new(cf);
with_settings!({
assert_snapshot!(cf.dump().unwrap());
assert_snapshot!(dump);
assert_snapshot!(cf);
assert_debug_snapshot!(cf);
});
Expand Down Expand Up @@ -1192,7 +1193,10 @@ mod tests {
fn parse(s: String) -> MiseToml {
let p = CWD.as_ref().unwrap().join(".test.mise.toml");
file::write(&p, s).unwrap();
MiseToml::from_file(&p).unwrap()
let cfg = MiseToml::from_file(&p).unwrap();
file::remove_file(&p).unwrap();

cfg
}

fn parse_env(toml: String) -> String {
Expand Down

0 comments on commit c41e0a3

Please sign in to comment.