Class: RSpec::Maybes::PositiveMaybeHandler

Inherits:
MaybeHandler
  • Object
show all
Defined in:
lib/rspec/maybes/handlers.rb

Class Method Summary collapse

Methods inherited from MaybeHandler

passes?

Class Method Details

.handle_matcher(actual, initial_matcher, message = nil, &block) ⇒ Object


29
30
31
32
33
34
# File 'lib/rspec/maybes/handlers.rb', line 29

def self.handle_matcher(actual, initial_matcher, message = nil, &block)
  matcher = super

  return ::RSpec::Matchers::BuiltIn::PositiveOperatorMatcher.new(actual) unless initial_matcher
  passes?(matcher) || MaybeHelper.handle_failure(matcher, message, :failure_message)
end

.verbObject


36
37
38
# File 'lib/rspec/maybes/handlers.rb', line 36

def self.verb
  'might'
end