Skip to content

Commit 787bd8a

Browse files
committed
Fix typo in normalized savedPSModulePath
1 parent 46ac068 commit 787bd8a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Tests/Engine/ModuleDependencyHandler.tests.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Describe "Resolve DSC Resource Dependency" {
88
$skipTest = $true
99
return
1010
}
11-
$SavedPSModulePath = $env:PSModulePath
11+
$savedPSModulePath = $env:PSModulePath
1212
$violationFileName = 'MissingDSCResource.ps1'
1313
$violationFilePath = Join-Path $directory $violationFileName
1414
$testRootDirectory = Split-Path -Parent $directory
@@ -27,7 +27,7 @@ Describe "Resolve DSC Resource Dependency" {
2727
}
2828
AfterAll {
2929
if ( $skipTest ) { return }
30-
$env:PSModulePath = $SavedPSModulePath
30+
$env:PSModulePath = $savedPSModulePath
3131
}
3232

3333
Context "Module handler class" {
@@ -58,7 +58,7 @@ Describe "Resolve DSC Resource Dependency" {
5858
$expectedPssaAppDataPath = Join-Path $depHandler.LocalAppDataPath "PSScriptAnalyzer"
5959
$depHandler.PSSAAppDataPath | Should -Be $expectedPssaAppDataPath
6060

61-
$expectedPSModulePath = $oldPSModulePath + [System.IO.Path]::PathSeparator + $depHandler.TempModulePath
61+
$expectedPSModulePath = $savedPSModulePath + [System.IO.Path]::PathSeparator + $depHandler.TempModulePath
6262
$env:PSModulePath | Should -Be $expectedPSModulePath
6363

6464
$depHandler.Dispose()
@@ -178,7 +178,7 @@ Describe "Resolve DSC Resource Dependency" {
178178
# Save the current environment variables
179179
$oldLocalAppDataPath = $env:LOCALAPPDATA
180180
$oldTempPath = $env:TEMP
181-
$oldPSModulePath = $env:PSModulePath
181+
$savedPSModulePath = $env:PSModulePath
182182

183183
# set the environment variables
184184
$tempPath = Join-Path $oldTempPath ([guid]::NewGUID()).ToString()
@@ -208,7 +208,7 @@ Describe "Resolve DSC Resource Dependency" {
208208

209209
AfterAll {
210210
if ( $skipTest ) { return }
211-
$env:PSModulePath = $oldPSModulePath
211+
$env:PSModulePath = $savedPSModulePath
212212
}
213213

214214
It "has a single parse error" -skip:$skipTest {
@@ -222,7 +222,7 @@ Describe "Resolve DSC Resource Dependency" {
222222

223223
It "Keeps PSModulePath unchanged before and after invocation" -skip:$skipTest {
224224
$dr = Invoke-ScriptAnalyzer -Path $violationFilePath -ErrorVariable parseErrors -ErrorAction SilentlyContinue
225-
$env:PSModulePath | Should -Be $oldPSModulePath
225+
$env:PSModulePath | Should -Be $savedPSModulePath
226226
}
227227

228228
if (!$skipTest)

0 commit comments

Comments
 (0)