Class: RR::TimesCalledMatchers::AtLeastMatcher

Inherits:
TimesCalledMatcher show all
Defined in:
lib/rr/times_called_matchers/at_least_matcher.rb

Instance Attribute Summary

Attributes inherited from TimesCalledMatcher

#times

Instance Method Summary collapse

Methods inherited from TimesCalledMatcher

#==, create, #error_message, #initialize

Constructor Details

This class inherits a constructor from RR::TimesCalledMatchers::TimesCalledMatcher

Instance Method Details

#attempt?(times_called) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/rr/times_called_matchers/at_least_matcher.rb', line 12

def attempt?(times_called)
  times_called < @times
end

#matches?(times_called) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/rr/times_called_matchers/at_least_matcher.rb', line 8

def matches?(times_called)
  times_called >= @times
end

#possible_match?(times_called) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/rr/times_called_matchers/at_least_matcher.rb', line 4

def possible_match?(times_called)
  true
end