2016-07-25 14:01:41 -07:00
|
|
|
Describe "Get-Location" -Tags "CI" {
|
2016-03-08 14:55:30 +08:00
|
|
|
$currentDirectory=[System.IO.Directory]::GetCurrentDirectory()
|
2015-07-15 10:15:39 -07:00
|
|
|
BeforeEach {
|
2016-03-08 14:55:30 +08:00
|
|
|
pushd $currentDirectory
|
2015-07-15 10:15:39 -07:00
|
|
|
}
|
|
|
|
|
|
2016-03-04 14:42:36 -08:00
|
|
|
AfterEach {
|
2016-03-04 14:52:27 -08:00
|
|
|
popd
|
2016-03-04 14:42:36 -08:00
|
|
|
}
|
2015-07-15 10:15:39 -07:00
|
|
|
|
|
|
|
|
It "Should list the output of the current working directory" {
|
2016-03-08 14:55:30 +08:00
|
|
|
|
|
|
|
|
(Get-Location).Path | Should Be $currentDirectory
|
2015-07-15 10:15:39 -07:00
|
|
|
}
|
|
|
|
|
|
2016-03-04 14:42:36 -08:00
|
|
|
It "Should do exactly the same thing as its alias" {
|
2016-03-04 14:52:27 -08:00
|
|
|
(pwd).Path | Should Be (Get-Location).Path
|
2015-07-15 10:15:39 -07:00
|
|
|
}
|
2015-07-24 10:38:51 -07:00
|
|
|
}
|