2015-10-22 16:35:31 -07:00
|
|
|
Describe "Get-Location aka pwd" {
|
2015-07-15 10:15:39 -07:00
|
|
|
<#Dependencies:
|
|
|
|
|
pushd
|
|
|
|
|
popd
|
|
|
|
|
$HOME
|
|
|
|
|
|
|
|
|
|
#>
|
|
|
|
|
$winHome = 'C:\Users\v-zafolw'
|
|
|
|
|
$nixHome = '/home/zafolw'
|
|
|
|
|
BeforeEach {
|
|
|
|
|
pushd $HOME #on windows, this is c:\Users\XXXXX; for *nix, it's /home/XXXXX
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AfterEach { popd }
|
|
|
|
|
|
|
|
|
|
It "Should list the output of the current working directory" {
|
|
|
|
|
(Get-Location).Path | Should Not BeNullOrEmpty
|
|
|
|
|
(Get-Location).Path | Should Be ($winHome -or $nixHome)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
It "Should be able to use pwd the same way" {
|
|
|
|
|
(pwd).Path | Should Not BeNullOrEmpty
|
|
|
|
|
(pwd).Path | Should Be ($winHome -or $nixHome)
|
|
|
|
|
}
|
2015-07-24 10:38:51 -07:00
|
|
|
}
|