You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a multi-line string, if I use it { is.expected_to contain_file('/mock/file.sh').with_content(multiline_content) } to do some initial simple 'golden master' style testing of a templated file, I get back a failed test with output that indicates a failed test, but shows no Diff. Is there a good way to check the full content of a file? I was wondering if it was related to the output problems listed in rodjek#327, about suppressing trailing newlines.
Failure/Error: it { is expected.to contain_file('/mock/file.sh').with_content(multiline_content) }
expected that the catalogue would contain File[/mock/file.sh] with content set to supplied string
Diff:
<The diff is empty, are your objects producing identical '#inspect' output?>
Expected Behavior
I would expect either a match, or a Diff that shows what is different. Ideally, I would love an example on the tutorial page of how to do a full file comparison.
Environment
Version: 4.0.2, installed via pdk 3.0.1
Platform: RHEL8
The text was updated successfully, but these errors were encountered:
Sorry, I didn't see your update! notifications get lost, and I am working on an air-gapped system, so a reproducer isn't so direct to pull over. I'll see if I can whip one up at home.
Describe the Bug
When using a multi-line string, if I use
it { is.expected_to contain_file('/mock/file.sh').with_content(multiline_content) }
to do some initial simple 'golden master' style testing of a templated file, I get back a failed test with output that indicates a failed test, but shows no Diff. Is there a good way to check the full content of a file? I was wondering if it was related to the output problems listed in rodjek#327, about suppressing trailing newlines.Expected Behavior
I would expect either a match, or a Diff that shows what is different. Ideally, I would love an example on the tutorial page of how to do a full file comparison.
Environment
The text was updated successfully, but these errors were encountered: