From 1943cdcf6084055d7ed12af032e0ba6ef6050e3d Mon Sep 17 00:00:00 2001 From: Dave Wyatt Date: Sat, 6 Feb 2016 10:41:08 -0500 Subject: [PATCH] PSv2 fix --- Functions/TestsRunningInCleanRunspace.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Functions/TestsRunningInCleanRunspace.Tests.ps1 b/Functions/TestsRunningInCleanRunspace.Tests.ps1 index 69db2d827..ceaee866e 100644 --- a/Functions/TestsRunningInCleanRunspace.Tests.ps1 +++ b/Functions/TestsRunningInCleanRunspace.Tests.ps1 @@ -1,6 +1,6 @@ function Invoke-PesterInJob ($ScriptBlock, [switch] $GenerateNUnitReport) { - $PesterPath = $ExecutionContext.SessionState.Module.ModuleBase + $PesterPath = Get-Module Pester | Select-Object -First 1 -ExpandProperty Path $job = Start-Job { param ($PesterPath, $TestDrive, $ScriptBlock, $GenerateNUnitReport)