From a9a4967846d576f1a59e3d109a0eb55de70238b6 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 13 Mar 2018 14:21:49 +0100 Subject: [PATCH] fix snapin test logic --- tests/Helper/01_Test-Module.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Helper/01_Test-Module.Tests.ps1 b/tests/Helper/01_Test-Module.Tests.ps1 index 51b4c0e..b413836 100644 --- a/tests/Helper/01_Test-Module.Tests.ps1 +++ b/tests/Helper/01_Test-Module.Tests.ps1 @@ -31,11 +31,11 @@ Describe "Test-ModuleName" { } } Context "Working with PSSnapins" { + $loaded = $null It "Loading first PSSnaping should not throw " { $Snap = Get-PSSnapin -Registered $Snap | Format-List | Out-String | Write-Verbose -Verbose { $loaded = Test-Module -Name $Snap.Name -Type PSSnapin } | Should -Not -Throw - Remove-PSSnapin -Name $Snap.Name } It "Loading first PSSnaping should return true" { $loaded | Should -Be $true