Object
# File lib/rspec/expectations/handler.rb, line 25 25: def self.handle_matcher(actual, matcher, message=nil, &block) 26: ::RSpec::Matchers.last_should = :should_not 27: ::RSpec::Matchers.last_matcher = matcher 28: return ::RSpec::Matchers::BuiltIn::NegativeOperatorMatcher.new(actual) if matcher.nil? 29: 30: match = matcher.respond_to?(:does_not_match?) ? 31: !matcher.does_not_match?(actual, &block) : 32: matcher.matches?(actual, &block) 33: return match unless match 34: 35: message ||= matcher.respond_to?(:failure_message_for_should_not) ? 36: matcher.failure_message_for_should_not : 37: matcher.negative_failure_message 38: 39: if matcher.respond_to?(:diffable?) && matcher.diffable? 40: ::RSpec::Expectations.fail_with message, matcher.expected, matcher.actual 41: else 42: ::RSpec::Expectations.fail_with message 43: end 44: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.