From a504defbb9ad82b0bc3b0a0ffd2082c14d2865c9 Mon Sep 17 00:00:00 2001 From: Jumping Yang Date: Tue, 8 Mar 2016 14:55:30 +0800 Subject: [PATCH] Fixed Pester Get-Location test --- test/powershell/Get-Location.Tests.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/powershell/Get-Location.Tests.ps1 b/test/powershell/Get-Location.Tests.ps1 index bfadbcee2..c5078a449 100644 --- a/test/powershell/Get-Location.Tests.ps1 +++ b/test/powershell/Get-Location.Tests.ps1 @@ -1,6 +1,7 @@ Describe "Get-Location" { + $currentDirectory=[System.IO.Directory]::GetCurrentDirectory() BeforeEach { - pushd $env:HOME + pushd $currentDirectory } AfterEach { @@ -8,7 +9,8 @@ Describe "Get-Location" { } It "Should list the output of the current working directory" { - (Get-Location).Path | Should Be $env:HOME + + (Get-Location).Path | Should Be $currentDirectory } It "Should do exactly the same thing as its alias" {