Sha256: e743c075f61a7525ea90150585e73c2cafaf2a1b6a6a979e676f5a9058de2c09

Contents?: true

Size: 392 Bytes

Versions: 4

Compression:

Stored size: 392 Bytes

Contents

module RR
module TimesCalledMatchers
  class AtLeastMatcher < TimesCalledMatcher
    def possible_match?(times_called)
      true
    end

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

    def attempt?(times_called)
      times_called < @times
    end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rr-0.1.8 lib/rr/times_called_matchers/at_least_matcher.rb
rr-0.1.10 lib/rr/times_called_matchers/at_least_matcher.rb
rr-0.1.7 lib/rr/times_called_matchers/at_least_matcher.rb
rr-0.1.9 lib/rr/times_called_matchers/at_least_matcher.rb