Module: RR::TimesCalledMatchers::Terminal

Included in:
AtMostMatcher, IntegerMatcher, NeverMatcher, RangeMatcher
Defined in:
lib/rr/times_called_matchers/terminal.rb

Overview

Including this module marks the TimesCalledMatcher as Terminal. Being Terminal the Double will “terminate” when times called is finite.

The Double that uses a Terminal TimesCalledMatcher will eventually be passed over to the next Double when passed the matching arguments enough times. This is done by the attempt? method returning false when executed a finite number of times.

This is in opposition to NonTerminal TimesCalledMatchers, where attempt? will always return true.

Instance Method Summary collapse

Instance Method Details

#terminal?Boolean

:nodoc:

Returns:

  • (Boolean)


15
16
17
# File 'lib/rr/times_called_matchers/terminal.rb', line 15

def terminal?
  true
end