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

20 lines
410 B
PowerShell
Raw Normal View History

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