Merge "Verify each line separately in fragment"

This commit is contained in:
Zuul 2023-09-05 15:53:59 +00:00 committed by Gerrit Code Review
commit 816ef63a83
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@ end
def verify_concat_fragment_contents(subject, title, expected_lines)
content = subject.resource('concat::fragment', title).send(:parameters)[:content]
expect(expected_lines & content.split("\n")).to eq(expected_lines)
expected_lines.each do |expected_line|
expect([expected_line] & content.split("\n")).to eq([expected_line])
end
end
at_exit { RSpec::Puppet::Coverage.report! }