Skip to content

Commit c4b39ff

Browse files
committed
Test creation of .mambarc on first run
1 parent 6f06bbf commit c4b39ff

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/env.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,13 @@ fn test_csm_env_info() -> Result<(), Error> {
4747
.stdout(predicate::str::contains("populated config files : "));
4848
Ok(())
4949
}
50+
51+
/// Test that running a command like `csm env info` generates a `.mambarc` in
52+
/// the user's home directory.
53+
#[test]
54+
fn test_csm_creates_mambarc() -> Result<(), Error> {
55+
let csm = common::Csm::new()?;
56+
csm.command().args(&["env", "info"]).assert().success();
57+
let mambarc_path = csm.home_dir.path().join(".mambarc");
58+
Ok(std::fs::read_to_string(mambarc_path).map(|_| ())?)
59+
}

0 commit comments

Comments
 (0)