diff --git a/src/pester-tests/Test-Get-Content.Tests.ps1 b/src/pester-tests/Test-Get-Content.Tests.ps1 index 2c76206bb6..2443770039 100644 --- a/src/pester-tests/Test-Get-Content.Tests.ps1 +++ b/src/pester-tests/Test-Get-Content.Tests.ps1 @@ -1,8 +1,4 @@ - - - - -Describe "Test-Get-Content" { +Describe "Test-Get-Content" { It "Should throw an error on a directory " { # also tests that -erroraction SilentlyContinue will work. @@ -14,17 +10,17 @@ Describe "Test-Get-Content" { } It "Should deliver an array object when listing a file" { - (Get-Content -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" - (Get-Content -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path" + (Get-Content -Path ./Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" + (Get-Content -Path ./Test-Get-Content.Tests.ps1)[0] |Should be "Describe `"Test-Get-Content`" `{" - (gc -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" - (gc -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path" + (gc -Path ./Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" + (gc -Path ./Test-Get-Content.Tests.ps1)[0] |Should be "Describe `"Test-Get-Content`" `{" - (type -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" - (type -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path" + (type -Path ./Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" + (type -Path ./Test-Get-Content.Tests.ps1)[0] |Should be "Describe `"Test-Get-Content`" `{" - (cat -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" - (cat -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path" + (cat -Path ./Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array" + (cat -Path ./Test-Get-Content.Tests.ps1)[0] |Should be "Describe `"Test-Get-Content`" `{" } } diff --git a/src/pester-tests/Test-Get-Item.Tests.ps1 b/src/pester-tests/Test-Get-Item.Tests.ps1 index c809a3683e..a66631107a 100644 --- a/src/pester-tests/Test-Get-Item.Tests.ps1 +++ b/src/pester-tests/Test-Get-Item.Tests.ps1 @@ -15,7 +15,7 @@ Describe "Test-Get-Item" { It "Should return the proper Name and BaseType for directory objects vs file system objects" { (Get-Item .).GetType().Name | Should Be 'DirectoryInfo' - (Get-Item .\Test-Get-Item.Tests.ps1).GetType().Name | Should Be 'FileInfo' + (Get-Item ./Test-Get-Item.Tests.ps1).GetType().Name | Should Be 'FileInfo' } It "Should return a different directory when a path argument is used" {