| Class | Spec::Expectations::NegativeExpectationMatcherHandler |
| In: |
lib/spec/expectations/handler.rb
|
| Parent: | Object |
# File lib/spec/expectations/handler.rb, line 24
24: def handle_matcher(actual, matcher, &block)
25: unless matcher.respond_to?(:negative_failure_message)
26: Spec::Expectations.fail_with(
27: "Matcher does not support should_not.\nSee Spec::Matchers for more information\nabout matchers.\n"
28: )
29: end
30: match = matcher.matches?(actual, &block)
31: ::Spec::Matchers.generated_description = "should not #{describe(matcher)}"
32: Spec::Expectations.fail_with(matcher.negative_failure_message) if match
33: end