Skip to content

Commit

Permalink
Update spectre testing dll path
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Apr 25, 2024
1 parent 7bf9f0a commit 5375a6c
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions PwshSpectreConsole.Tests/@init/Start-SpectreDemo.tests.ps1
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Remove-Module PwshSpectreConsole -Force -ErrorAction SilentlyContinue
try {
Import-Module "$PSScriptRoot\..\..\PwshSpectreConsole\PwshSpectreConsole.psd1" -Force
} catch {
Write-Warning "Failed to import PwshSpectreConsole module, rebuilding..."
& "$PSScriptRoot\..\..\PwshSpectreConsole\build.ps1"
}

Import-Module "$PSScriptRoot\..\..\PwshSpectreConsole\PwshSpectreConsole.psd1" -Force

if (-not ([System.AppDomain]::CurrentDomain.GetAssemblies().FullName | Where-Object { $_ -like "*Spectre.Console.Testing*" })) {
Add-Type -Path "$PSScriptRoot\..\packages\Spectre.Console.Testing\lib\netstandard2.0\Spectre.Console.Testing.dll"
}

Describe "Start-SpectreDemo" {
InModuleScope "PwshSpectreConsole" {

It "Should have a demo function available, we're just testing the module was loaded correctly" {
Get-Command "Start-SpectreDemo" | Should -Not -BeNullOrEmpty
}
}
Remove-Module PwshSpectreConsole -Force -ErrorAction SilentlyContinue
try {
Import-Module "$PSScriptRoot\..\..\PwshSpectreConsole\PwshSpectreConsole.psd1" -Force
} catch {
Write-Warning "Failed to import PwshSpectreConsole module, rebuilding..."
& "$PSScriptRoot\..\..\PwshSpectreConsole\build.ps1"
}

Import-Module "$PSScriptRoot\..\..\PwshSpectreConsole\PwshSpectreConsole.psd1" -Force

if (-not ([System.AppDomain]::CurrentDomain.GetAssemblies().FullName | Where-Object { $_ -like "*Spectre.Console.Testing*" })) {
Add-Type -Path "$PSScriptRoot\..\packages\Spectre.Console.Testing\lib\net8.0\Spectre.Console.Testing.dll"
}

Describe "Start-SpectreDemo" {
InModuleScope "PwshSpectreConsole" {

It "Should have a demo function available, we're just testing the module was loaded correctly" {
Get-Command "Start-SpectreDemo" | Should -Not -BeNullOrEmpty
}
}
}

0 comments on commit 5375a6c

Please sign in to comment.