From 1c1c1dacaaa1460119154bc0c974ccbf7860bb1f Mon Sep 17 00:00:00 2001 From: Zachary Folwick Date: Tue, 25 Aug 2015 10:15:21 -0700 Subject: [PATCH] turned repeated string into a variable --- src/pester-tests/Test-Environment-Variables.Tests.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pester-tests/Test-Environment-Variables.Tests.ps1 b/src/pester-tests/Test-Environment-Variables.Tests.ps1 index d659ae56fd..4bf643ffea 100644 --- a/src/pester-tests/Test-Environment-Variables.Tests.ps1 +++ b/src/pester-tests/Test-Environment-Variables.Tests.ps1 @@ -18,10 +18,11 @@ } It "Should be able to set the environment variables" { - { $ENV:TESTENVIRONMENTVARIABLE = "this is a test environment variable" } | Should Not Throw + $expected = "this is a test environment variable" + { $ENV:TESTENVIRONMENTVARIABLE = $expected } | Should Not Throw $ENV:TESTENVIRONMENTVARIABLE | Should Not BeNullOrEmpty - $ENV:TESTENVIRONMENTVARIABLE | Should Be "this is a test environment variable" + $ENV:TESTENVIRONMENTVARIABLE | Should Be $expected }