Class: RR::TimesCalledMatchers::AtMostMatcher
- Inherits:
-
TimesCalledMatcher
show all
- Includes:
- Terminal
- Defined in:
- lib/rr/times_called_matchers/at_most_matcher.rb
Instance Attribute Summary
#times
Instance Method Summary
(collapse)
Methods included from Terminal
#terminal?
#==, #error_message, #initialize
Instance Method Details
- (Boolean) attempt?(times_called)
14
15
16
|
# File 'lib/rr/times_called_matchers/at_most_matcher.rb', line 14
def attempt?(times_called)
times_called < @times
end
|
- (Object) expected_times_message
18
19
20
|
# File 'lib/rr/times_called_matchers/at_most_matcher.rb', line 18
def expected_times_message
"at most #{@times.inspect} times"
end
|
- (Boolean) matches?(times_called)
10
11
12
|
# File 'lib/rr/times_called_matchers/at_most_matcher.rb', line 10
def matches?(times_called)
times_called <= @times
end
|
- (Boolean) possible_match?(times_called)
6
7
8
|
# File 'lib/rr/times_called_matchers/at_most_matcher.rb', line 6
def possible_match?(times_called)
times_called <= @times
end
|