Sha256: 561745346f1d0507fcaa548e849e408026bd1eda5778e45256286e7272874483

Contents?: true

Size: 450 Bytes

Versions: 66

Compression:

Stored size: 450 Bytes

Contents

module RR
  module TimesCalledMatchers #:nodoc:
    class AtMostMatcher < TimesCalledMatcher
      include Terminal

      def possible_match?(times_called)
        times_called <= @times
      end

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

      def attempt?(times_called)
        times_called < @times
      end

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

Version data entries

66 entries across 62 versions & 8 rubygems

Version Path
rr-3.1.1 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.1.0 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.9 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.8 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.7 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.6 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.5 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.4 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.3 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.2 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.1 lib/rr/times_called_matchers/at_most_matcher.rb
rr-3.0.0 lib/rr/times_called_matchers/at_most_matcher.rb
rr-1.2.1 lib/rr/times_called_matchers/at_most_matcher.rb
rr-1.2.0 lib/rr/times_called_matchers/at_most_matcher.rb
jferris-rr-0.7.1.0.1239654108 lib/rr/times_called_matchers/at_most_matcher.rb
redinger-redinger-rr-0.10.3 lib/rr/times_called_matchers/at_most_matcher.rb
redinger-rr-0.10.4 lib/rr/times_called_matchers/at_most_matcher.rb
rr-1.1.2 lib/rr/times_called_matchers/at_most_matcher.rb
rr-1.1.2.rc1 lib/rr/times_called_matchers/at_most_matcher.rb
rr-1.1.1 lib/rr/times_called_matchers/at_most_matcher.rb