@@ -321,8 +321,11 @@ When "the settings file should (\w+)\s*(.*)?" {
321321 param ($operator , $data )
322322 # Normalize line endings, because the module does:
323323 $data = [regex ]::escape(($data -replace " \r?\n" , " `n " )) -replace ' \\n' , ' \r?\n'
324- if ($operator -eq " Contain" ){ $operator = " ContainMultiline" }
325- ${SettingsFile} | Should $operator $data
324+ if ($operator -eq " Contain" ){
325+ (Get-Content ${SettingsFile} - raw) -match $data | Should Be $True
326+ } else {
327+ ${SettingsFile} | Should $operator $data
328+ }
326329}
327330
328331Given " the settings file does not exist" {
@@ -351,6 +354,9 @@ When "we expect an? (?<type>warning|error|verbose) in the (?<module>.*) module"
351354 }
352355}
353356
357+ # Then the error is logged exactly 2 times
358+ # Then the warning is logged 3 times
359+ # Then the error is logged
354360# this step lets us verify the number of calls to those three mocks
355361When " the (?<type>warning|error|verbose) is logged(?: (?<exactly>exactly) (\d+) times?)?" {
356362 param ($count , $exactly , $type )
@@ -381,8 +387,6 @@ When "we add a converter with a number as a key" {
381387 }
382388}
383389
384- # Then the error is logged exactly 2 times
385-
386390Then " the settings object should be of type (.*)" {
387391 param ([Type ]$Type )
388392 $Settings | Should BeOfType $Type
0 commit comments