Class: RR::TimesCalledMatchers::AtLeastMatcher

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

Instance Attribute Summary

Attributes inherited from TimesCalledMatcher

#times

Instance Method Summary collapse

Methods included from NonTerminal

#attempt?, #possible_match?, #terminal?

Methods inherited from TimesCalledMatcher

#==, #attempt?, #error_message, #initialize

Constructor Details

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

Instance Method Details

#expected_times_messageObject



10
11
12
# File 'lib/rr/times_called_matchers/at_least_matcher.rb', line 10

def expected_times_message
  "at least #{@times.inspect} times"
end

#matches?(times_called) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/rr/times_called_matchers/at_least_matcher.rb', line 6

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