Sha256: 9a9f2d30879a9f708991f191f3c1c9f4e07ce094ee8b12ffd5fcc548c3fbacf3

Contents?: true

Size: 475 Bytes

Versions: 26

Compression:

Stored size: 475 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

      protected
      def expected_message_part
        "Expected at most #{@times.inspect} times."
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
adva-0.3.2 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.3.1 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.3.0 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.2.4 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.2.3 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.2.2 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.2.1 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.2.0 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.1.4 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.1.3 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.1.2 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.1.1 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.1.0 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
adva-0.0.1 test/rr/lib/rr/times_called_matchers/at_most_matcher.rb
rr-0.4.7 lib/rr/times_called_matchers/at_most_matcher.rb
rr-0.4.3 lib/rr/times_called_matchers/at_most_matcher.rb
rr-0.4.2 lib/rr/times_called_matchers/at_most_matcher.rb
rr-0.4.10 lib/rr/times_called_matchers/at_most_matcher.rb
rr-0.4.6 lib/rr/times_called_matchers/at_most_matcher.rb
rr-0.4.1 lib/rr/times_called_matchers/at_most_matcher.rb