From 75c70a2a7cfbe61108b80aac4e3b80b8a46c8d4f Mon Sep 17 00:00:00 2001 From: Ilya Date: Fri, 24 Aug 2018 03:15:03 +0500 Subject: [PATCH] Update pester syntax in `Set-Location` test (#7615) --- .../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 5ea2f278bc..5ba2354635 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 }