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