1 2 3 4 5 6 7 8 9 10 11 12 13 14
#[cfg(test)] mod tests { use pretty_assertions::assert_eq; use strut_core::AppProfile; #[test] fn custom() { // When unsafe { std::env::set_var("APP_PROFILE", "CUSTOM_PROFILE") } // Then assert_eq!(AppProfile::active().as_str(), "customp"); } }