From 5a4fcb4de57c33929f08817273e1936bc8dcfe9f Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 13 Mar 2018 14:25:56 +0100 Subject: [PATCH] adds additional pssnapin test --- tests/Helper/01_Test-Module.Tests.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Helper/01_Test-Module.Tests.ps1 b/tests/Helper/01_Test-Module.Tests.ps1 index b413836..86dcb80 100644 --- a/tests/Helper/01_Test-Module.Tests.ps1 +++ b/tests/Helper/01_Test-Module.Tests.ps1 @@ -31,14 +31,15 @@ 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 } It "Loading first PSSnaping should return true" { - $loaded | Should -Be $true + $Snap = Get-PSSnapin -Registered + $Snap | Format-List | Out-String | Write-Verbose -Verbose + Test-Module -Name $Snap.Name -Type PSSnapin | Should -Be $true } } }