Sha256: a6e025492c695c1eddbf0ce09352955dde7e77f04f3c16ac0b4a972224842796

Contents?: true

Size: 693 Bytes

Versions: 19

Compression:

Stored size: 693 Bytes

Contents

module RR
module TimesCalledMatchers
  # Including this module marks the TimesCalledMatcher as NonTerminal.
  # Being NonTerminal means the Scenario will not "terminate" even when
  # called infinite times.
  #
  # The Scenario that uses a NonTerminal TimesCalledMatcher will
  # continue using the Scenario when passed the matching arguments.
  # This is done by the attempt? always returning true.
  #
  # This is in opposition to Terminal TimesCalledMatchers, where
  # attempt? will eventually return false.
  module NonTerminal
    def terminal?
      false
    end

    def possible_match?(times_called)
      true
    end

    def attempt?(times_called)
      true
    end
  end
end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rr-0.1.14 lib/rr/times_called_matchers/non_terminal.rb
rr-0.1.15 lib/rr/times_called_matchers/non_terminal.rb
rr-0.2.4 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.2 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.11 lib/rr/times_called_matchers/non_terminal.rb
rr-0.2.1 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.1 lib/rr/times_called_matchers/non_terminal.rb
rr-0.2.2 lib/rr/times_called_matchers/non_terminal.rb
rr-0.2.5 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.10 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.3 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.4 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.0 lib/rr/times_called_matchers/non_terminal.rb
rr-0.2.3 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.5 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.6 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.9 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.8 lib/rr/times_called_matchers/non_terminal.rb
rr-0.3.7 lib/rr/times_called_matchers/non_terminal.rb