Method: ComplainMatcher#negative_failure_message

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

#negative_failure_messageObject



41
42
43
44
45
46
47
48
49
# File 'lib/mspec/matchers/complain.rb', line 41

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