Dynamically load script based on test file name
This commit is contained in:
parent
a93bf5d923
commit
0d4eb555bd
@ -19,7 +19,7 @@ Describe 'Install-WinAcme' {
|
||||
Uninstall-WinAcme -DestinationPath 'C:\Program Files\win-acme'
|
||||
|
||||
# Load the Install-WinAcme function
|
||||
Set-Item function:Install-WinAcme ([ScriptBlock]::Create((Get-Content -Raw 'windows\Install-WinAcme.ps1')))
|
||||
Set-Item function:Install-WinAcme ([ScriptBlock]::Create((Get-Content -Raw $PSCommandPath.Replace('.Tests.ps1', '.ps1'))))
|
||||
}
|
||||
|
||||
It 'Has the correct parameters' {
|
||||
|
||||
@ -30,7 +30,7 @@ Describe 'Install-IPerf3' {
|
||||
Uninstall-IPerf3 -DestinationPath 'C:\Program Files\iPerf3'
|
||||
|
||||
# Load the Install-iPerf3 function
|
||||
Set-Item function:Install-IPerf3 ([ScriptBlock]::Create((Get-Content -Raw 'windows\Install-iPerf3.ps1')))
|
||||
Set-Item function:Install-IPerf3 ([ScriptBlock]::Create((Get-Content -Raw $PSCommandPath.Replace('.Tests.ps1', '.ps1'))))
|
||||
}
|
||||
|
||||
It 'Has the correct parameters' {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user