From 901160cb78075a67aa444933616e1cbcc90d4bd3 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 4 Mar 2016 14:42:36 -0800 Subject: [PATCH] Fix Get-Location tests These should never have passed. --- test/powershell/Get-Location.Tests.ps1 | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/test/powershell/Get-Location.Tests.ps1 b/test/powershell/Get-Location.Tests.ps1 index 4a27d77c58..7a5dee9c61 100644 --- a/test/powershell/Get-Location.Tests.ps1 +++ b/test/powershell/Get-Location.Tests.ps1 @@ -1,25 +1,17 @@ -Describe "Get-Location aka pwd" { - <#Dependencies: - pushd - popd - $HOME - - #> - $winHome = 'C:\Users\v-zafolw' - $nixHome = '/home/zafolw' +Describe "Get-Location" { BeforeEach { - pushd $HOME #on windows, this is c:\Users\XXXXX; for *nix, it's /home/XXXXX + pushd $env:HOME } - AfterEach { popd } + 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) + (Get-Location).Path | Should Be $env:HOME } - It "Should be able to use pwd the same way" { - (pwd).Path | Should Not BeNullOrEmpty - (pwd).Path | Should Be ($winHome -or $nixHome) + It "Should do exactly the same thing as its alias" { + (pwd).Path | Should Be (Get-Location).Path } }