PowerShell/test/powershell/Get-Location.Tests.ps1

20 lines
410 B
PowerShell
Raw Normal View History

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