adds additional pssnapin test
This commit is contained in:
parent
a9a4967846
commit
5a4fcb4de5
@ -31,14 +31,15 @@ Describe "Test-ModuleName" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Context "Working with PSSnapins" {
|
Context "Working with PSSnapins" {
|
||||||
$loaded = $null
|
|
||||||
It "Loading first PSSnaping should not throw " {
|
It "Loading first PSSnaping should not throw " {
|
||||||
$Snap = Get-PSSnapin -Registered
|
$Snap = Get-PSSnapin -Registered
|
||||||
$Snap | Format-List | Out-String | Write-Verbose -Verbose
|
$Snap | Format-List | Out-String | Write-Verbose -Verbose
|
||||||
{ $loaded = Test-Module -Name $Snap.Name -Type PSSnapin } | Should -Not -Throw
|
{ $loaded = Test-Module -Name $Snap.Name -Type PSSnapin } | Should -Not -Throw
|
||||||
}
|
}
|
||||||
It "Loading first PSSnaping should return true" {
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user