From 0d7e2bbe777c996933b069c125bd4d759ad0960f Mon Sep 17 00:00:00 2001 From: iSazonov Date: Thu, 23 Aug 2018 08:52:23 +0500 Subject: [PATCH] Fix Set-Location test --- .../Microsoft.PowerShell.Management/Set-Location.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Location.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Location.Tests.ps1 index 5ea2f278bc7..5ba23546351 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Location.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Location.Tests.ps1 @@ -175,7 +175,7 @@ Describe "Set-Location" -Tags "CI" { Set-Location .. $ExecutionContext.InvokeCommand.LocationChangedAction = { throw "Boom" } # Verify that the exception occurred - { Set-Location $location } | Should Throw "Boom" + { Set-Location $location } | Should -Throw "Boom" # But the location should still have changed $PWD.Path | Should -Be $location.Path }