From 02b1d44440391b5b5ccb1c8aa14907cc0cbaf89e Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Wed, 29 Nov 2023 18:11:40 +0100 Subject: [PATCH] Improve environment variable test --- integration/env.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/integration/env.rs b/integration/env.rs index 259b346..80e0bfa 100644 --- a/integration/env.rs +++ b/integration/env.rs @@ -17,9 +17,7 @@ pub fn setup() -> TestSetup { } pub fn validate(_data: String) { - // The `PUBLIC` environment variable can be accessed. - assert_eq!(env::var("PUBLIC"), Ok("GOOD".into())); - - // The `PRIVATE` environment variable was removed. - assert_eq!(env::var_os("PRIVATE"), None); + // Only the `PUBLIC` environment variable remains. + let env: Vec<_> = env::vars().collect(); + assert_eq!(env, vec![("PUBLIC".into(), "GOOD".into())]); }