Parent

Class Index [+]

Quicksearch

RSpec::Expectations::PositiveExpectationHandler

Public Class Methods

handle_matcher(actual, matcher, message=nil, &block) click to toggle source
    # File lib/rspec/expectations/handler.rb, line 4
 4:       def self.handle_matcher(actual, matcher, message=nil, &block)
 5:         ::RSpec::Matchers.last_should = :should
 6:         ::RSpec::Matchers.last_matcher = matcher
 7:         return ::RSpec::Matchers::BuiltIn::PositiveOperatorMatcher.new(actual) if matcher.nil?
 8: 
 9:         match = matcher.matches?(actual, &block)
10:         return match if match
11:         
12:         message ||= matcher.respond_to?(:failure_message_for_should) ?
13:                     matcher.failure_message_for_should :
14:                     matcher.failure_message
15:         
16:         if matcher.respond_to?(:diffable?) && matcher.diffable?
17:           ::RSpec::Expectations.fail_with message, matcher.expected, matcher.actual
18:         else
19:           ::RSpec::Expectations.fail_with message
20:         end
21:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.