2016-03-04 23:48:30 +01:00
|
|
|
Describe "Pop-Location" {
|
|
|
|
$startDirectory = $(Get-Location).Path
|
|
|
|
|
|
|
|
BeforeEach { Set-Location $startDirectory }
|
|
|
|
|
|
|
|
It "Should be able to be called without error" {
|
|
|
|
{ Pop-Location } | Should Not Throw
|
|
|
|
}
|
|
|
|
|
|
|
|
It "Should not take a parameter" {
|
|
|
|
{ Pop-Location .. } | Should Throw
|
|
|
|
}
|
|
|
|
|
|
|
|
It "Should be able pop multiple times" {
|
|
|
|
Push-Location ..
|
|
|
|
Push-Location ..
|
|
|
|
Push-Location ..
|
|
|
|
|
|
|
|
Pop-Location
|
|
|
|
Pop-Location
|
|
|
|
Pop-Location
|
|
|
|
|
|
|
|
$(Get-Location).Path | Should Be $startDirectory
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Set-Location $startDirectory
|
2015-10-27 19:20:35 +01:00
|
|
|
}
|