PowerShell/test/powershell/Pop-Location.Tests.ps1
Andrew Schwartzmeyer bbebf2f76a Reorganize tests
- Pester source code moved to `test/Pester`, deleted `ext-src`.
- Pester tests (.ps1 files) moved to `test/powershell`
- xUnit tests (.cs files) moved to `test/csharp`
- Third-party script test moved to `test/shebang`
2016-01-14 17:00:06 -08:00

28 lines
627 B
PowerShell

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
}