Method: ComplainMatcher#failure_message

Defined in:
lib/mspec/matchers/complain.rb

#failure_messageObject



31
32
33
34
35
36
37
38
39
# File 'lib/mspec/matchers/complain.rb', line 31

def failure_message
  if @complaint.nil?
    ["Expected a warning", "but received none"]
  elsif @complaint.kind_of? Regexp
    ["Expected warning to match:", @complaint.inspect]
  else
    ["Expected warning: #{@complaint.inspect}", "but got: #{@stderr.chomp.inspect}"]
  end
end