test: introduce env variable mocking (#1490)

This commit is contained in:
Tilmann Meyer
2020-08-07 21:13:12 +02:00
committed by GitHub
parent 8b0f589486
commit 88b603be38
87 changed files with 4619 additions and 4688 deletions
+2
View File
@@ -1,5 +1,6 @@
use crate::utils::exec_cmd;
use clap::crate_version;
use std::fs;
use std::path::PathBuf;
@@ -254,5 +255,6 @@ mod tests {
let config_path = get_config_path("bash");
assert_eq!("/test/home/.bashrc", config_path.unwrap().to_str().unwrap());
env::remove_var("HOME");
}
}