added a beforeEach clause
This commit is contained in:
parent
22348bdb91
commit
fd8a9d25ac
1 changed files with 4 additions and 13 deletions
|
@ -1,24 +1,18 @@
|
|||
Describe "Test-Format-List" {
|
||||
It "Should call format list without error" {
|
||||
BeforeEach {
|
||||
$input = New-Object PSObject
|
||||
Add-Member -InputObject $input -MemberType NoteProperty -Name testName -Value testValue
|
||||
}
|
||||
|
||||
It "Should call format list without error" {
|
||||
{ $input | Format-List } | Should Not Throw
|
||||
|
||||
}
|
||||
|
||||
It "Should be able to call the alias" {
|
||||
$input = New-Object PSObject
|
||||
Add-Member -InputObject $input -MemberType NoteProperty -Name testName -Value testValue
|
||||
|
||||
{ $input | fl } | Should Not Throw
|
||||
|
||||
}
|
||||
|
||||
It "Should have the same output whether choosing alias or not" {
|
||||
$input = New-Object PSObject
|
||||
Add-Member -InputObject $input -MemberType NoteProperty -Name testName -Value testValue
|
||||
|
||||
$expected = $input | Format-List | Out-String
|
||||
$actual = $input | fl | Out-String
|
||||
|
||||
|
@ -78,9 +72,6 @@ Describe "Test-Format-List" {
|
|||
}
|
||||
|
||||
It "Should be able to take input without piping objects to it" {
|
||||
$input = New-Object PSObject
|
||||
Add-Member -InputObject $input -MemberType NoteProperty -Name testName -Value testValue
|
||||
|
||||
$output = { Format-List -InputObject $input }
|
||||
|
||||
$output | Should Not Throw
|
||||
|
|
Loading…
Reference in a new issue