From c6f4a64f363d6208d3ad325513cf004cef83daaf Mon Sep 17 00:00:00 2001 From: Keith Dahlby Date: Thu, 31 Mar 2022 02:29:28 -0500 Subject: [PATCH] Try to simplify assert --- test/Utils.Tests.ps1 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/Utils.Tests.ps1 b/test/Utils.Tests.ps1 index a300bc52d..0f77383b0 100644 --- a/test/Utils.Tests.ps1 +++ b/test/Utils.Tests.ps1 @@ -118,6 +118,8 @@ New-Alias pscore C:\Users\Keith\GitHub\rkeithhill\PowerShell\src\powershell-win- It 'Removes import from the profile correctly' { $profileContent = @' Import-Module PSCX + +# import posh-git here: '@ Set-Content $profilePath -Value $profileContent -Encoding Ascii @@ -129,12 +131,8 @@ Import-Module PSCX Write-Host "output: $output" $output.Length | Should -Be 0 Get-FileEncoding $profilePath | Should -Be 'ascii' - $content = Get-Content $profilePath - $content.Count | Should -Be 2 - $content[0] | Should -BeExactly $profileContent - $content[1] | Should -BeExactly '' - $expectedContent = Convert-NativeLineEnding $profileContent - $content -join "" | Should -BeExactly $expectedContent + $content = Get-Content $profilePath -Raw + $content | Should -Be "$profileContent${newline}" } }