@@ -18,7 +18,7 @@ Describe 'Start-ScriptLogger' {
1818 Mock Get-Date { return [DateTime ]::new(2010 , 12 , 06 , 18 , 20 , 22 ) } - ModuleName $moduleName
1919
2020 $defaultEnabled = $true
21- $defaultPath = " $PSScriptRoot \ Start-ScriptLogger.Tests.ps1.log"
21+ $defaultPath = Join-Path - Path $PSScriptRoot - ChildPath ' Start-ScriptLogger.Tests.ps1.log'
2222 $defaultFormat = ' {0:yyyy-MM-dd} {0:HH:mm:ss} {1} {2} {3,-11} [{5}] {4}'
2323 $defaultLevel = ' Verbose'
2424 $defaultEncoding = ' UTF8'
@@ -134,7 +134,7 @@ Describe 'Start-ScriptLogger' {
134134
135135 # Arrange
136136 $expectedRotation = ' Hourly'
137- $expectedPath = " $PSScriptRoot \ Start-ScriptLogger.Tests.ps1.2010120618.log"
137+ $expectedPath = Join-Path - Path $PSScriptRoot - ChildPath ' Start-ScriptLogger.Tests.ps1.2010120618.log'
138138
139139 # Act
140140 $scriptLogger = Start-ScriptLogger - Rotation $expectedRotation - PassThru
@@ -157,7 +157,7 @@ Describe 'Start-ScriptLogger' {
157157
158158 # Arrange
159159 $expectedRotation = ' Daily'
160- $expectedPath = " $PSScriptRoot \ Start-ScriptLogger.Tests.ps1.20101206.log"
160+ $expectedPath = Join-Path - Path $PSScriptRoot - ChildPath ' Start-ScriptLogger.Tests.ps1.20101206.log'
161161
162162 # Act
163163 $scriptLogger = Start-ScriptLogger - Rotation $expectedRotation - PassThru
@@ -179,7 +179,7 @@ Describe 'Start-ScriptLogger' {
179179
180180 # Arrange
181181 $expectedRotation = ' Monthly'
182- $expectedPath = " $PSScriptRoot \ Start-ScriptLogger.Tests.ps1.201012.log"
182+ $expectedPath = Join-Path - Path $PSScriptRoot - ChildPath ' Start-ScriptLogger.Tests.ps1.201012.log'
183183
184184 # Act
185185 $scriptLogger = Start-ScriptLogger - Rotation $expectedRotation - PassThru
@@ -201,7 +201,7 @@ Describe 'Start-ScriptLogger' {
201201
202202 # Arrange
203203 $expectedRotation = ' Yearly'
204- $expectedPath = " $PSScriptRoot \ Start-ScriptLogger.Tests.ps1.2010.log"
204+ $expectedPath = Join-Path - Path $PSScriptRoot - ChildPath ' Start-ScriptLogger.Tests.ps1.2010.log'
205205
206206 # Act
207207 $scriptLogger = Start-ScriptLogger - Rotation $expectedRotation - PassThru
0 commit comments