PowerShell/test/powershell/Get-Location.Tests.ps1
2016-03-08 14:55:30 +08:00

20 lines
410 B
PowerShell

Describe "Get-Location" {
$currentDirectory=[System.IO.Directory]::GetCurrentDirectory()
BeforeEach {
pushd $currentDirectory
}
AfterEach {
popd
}
It "Should list the output of the current working directory" {
(Get-Location).Path | Should Be $currentDirectory
}
It "Should do exactly the same thing as its alias" {
(pwd).Path | Should Be (Get-Location).Path
}
}