mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
Merge pull request #656 from chef/dr/cmp-info
bugfix: print cmp expectations
This commit is contained in:
commit
ea5a96fc8a
1 changed files with 4 additions and 4 deletions
|
@ -282,13 +282,13 @@ RSpec::Matchers.define :cmp do |first_expected|
|
|||
end
|
||||
|
||||
failure_message do |actual|
|
||||
actual = '0' + actual.to_s(8) if octal?(expected)
|
||||
"\nexpected: value #{@operation} #{expected}\n got: #{actual}\n\n(compared using `cmp` matcher)\n"
|
||||
actual = '0' + actual.to_s(8) if octal?(@expected)
|
||||
"\nexpected: value #{@operation} #{@expected}\n got: #{actual}\n\n(compared using `cmp` matcher)\n"
|
||||
end
|
||||
|
||||
failure_message_when_negated do |actual|
|
||||
actual = '0' + actual.to_s(8) if octal?(expected)
|
||||
"\nexpected: value ! #{@operation} #{expected}\n got: #{actual}\n\n(compared using `cmp` matcher)\n"
|
||||
actual = '0' + actual.to_s(8) if octal?(@expected)
|
||||
"\nexpected: value ! #{@operation} #{@expected}\n got: #{actual}\n\n(compared using `cmp` matcher)\n"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue