Skip to content

Commit

Permalink
Try to simplify assert
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Mar 31, 2022
1 parent 8ed98be commit c6f4a64
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/Utils.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}"
}
}

Expand Down

0 comments on commit c6f4a64

Please sign in to comment.