class RSpec::Given::HaveFailed::HaveFailedMatcher
The RSpec-2.12 and later version of the have_failed matcher
The Pre-Rspec 2.12 version of the matcher
Public Instance Methods
does_not_match?(given_proc)
click to toggle source
Calls superclass method
# File lib/given/rspec/have_failed_212.rb 16 def does_not_match?(given_proc) 17 if given_proc.is_a?(::Given::Failure) 18 super(given_proc) 19 else 20 super(lambda { }) 21 end 22 end
matches?(given_proc, negative_expectation = false)
click to toggle source
Calls superclass method
# File lib/given/rspec/have_failed_212.rb 8 def matches?(given_proc, negative_expectation = false) 9 if given_proc.is_a?(::Given::Failure) 10 super(lambda { given_proc.call }, negative_expectation) 11 else 12 super(lambda { }, negative_expectation) 13 end 14 end
to_s()
click to toggle source
# File lib/given/rspec/have_failed_212.rb 24 def to_s 25 "<Failure matching #{@expected_error}: #{@expected_message.inspect}>" 26 end