Skip to content

Commit 0e83742

Browse files
pathing issue
1 parent b0cbe9b commit 0e83742

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

PSModuleDevelopment/tests/functions/Templates.Tests.ps1

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
Describe "Verifying templating component" {
22
BeforeAll {
3-
$tmpFolder = New-PSFTempDirectory -Name Template -ModuleName PSModuleDevelopment
43
$resourcePath = Resolve-PSFPath -Path "$PSScriptRoot\..\resources"
54
$templateName = 'TestTemplate-{0}' -f (Get-Random)
65
}
7-
AfterAll {
8-
Write-Host "Path: $resourcePath"
9-
Remove-PSFTempItem -Name Template -ModuleName PSModuleDevelopment
10-
}
116

127
It "Should Record the template correctly" {
138
{ New-PSMDTemplate -TemplateName $templateName -FilePath "$resourcePath\þnameþ.txt" -EnableException -ErrorAction Stop } | Should -Not -Throw
@@ -21,8 +16,8 @@
2116
}
2217

2318
It "Should Invoke the template correctly" {
24-
{ Invoke-PSMDTemplate -TemplateName $templateName -OutPath $tmpFolder -Name Test -EnableException } | Should -Not -Throw
25-
$content = Get-Content -Path "$tmpFolder\Test.txt" -ErrorAction Stop
19+
{ Invoke-PSMDTemplate -TemplateName $templateName -OutPath TestDrive:\ -Name Test -EnableException } | Should -Not -Throw
20+
$content = Get-Content -Path "TestDrive:\Test.txt" -ErrorAction Stop
2621
$values = $content | ConvertFrom-StringData -ErrorAction Stop
2722
$values.Name | Should -Be Test
2823
$values.Value | Should -Be '123'

0 commit comments

Comments
 (0)