Class: Spec::Expectations::ExpectationMatcherHandler
- Extended by:
- MatcherHandlerHelper
- Defined in:
- lib/spec/expectations/handler.rb
Class Method Summary collapse
Methods included from MatcherHandlerHelper
Class Method Details
.handle_matcher(actual, matcher, &block) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/spec/expectations/handler.rb', line 13 def handle_matcher(actual, matcher, &block) unless matcher.nil? match = matcher.matches?(actual, &block) ::Spec::Matchers.generated_description = "should #{describe(matcher)}" Spec::Expectations.fail_with(matcher.) unless match end end |