method
failure_message_for_should
1.2.0 -
Show latest stable
- Class:
Spec::Matchers::MatchArray
failure_message_for_should()public
No documentation available.
# File lib/spec/matchers/match_array.rb, line 17
def failure_message_for_should
message = "expected collection contained: #{@expected.sort.inspect}\n"
message += "actual collection contained: #{@actual.sort.inspect}\n"
message += "the missing elements were: #{@missing_items.sort.inspect}\n" unless @missing_items.empty?
message += "the extra elements were: #{@extra_items.sort.inspect}\n" unless @extra_items.empty?
message
end