Sha256: 346cf0d1f778ac357864027e201aae6c5d8b195bf91fc8c656f2eed4fe2c3188

Contents?: true

Size: 303 Bytes

Versions: 7

Compression:

Stored size: 303 Bytes

Contents

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

    def matches?(times_called)
      @times.call(times_called)
    end

    def attempt?(times_called)
      possible_match?(times_called)
    end
  end
end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rr-0.1.13 lib/rr/times_called_matchers/proc_matcher.rb
rr-0.1.12 lib/rr/times_called_matchers/proc_matcher.rb
rr-0.1.8 lib/rr/times_called_matchers/proc_matcher.rb
rr-0.1.10 lib/rr/times_called_matchers/proc_matcher.rb
rr-0.1.7 lib/rr/times_called_matchers/proc_matcher.rb
rr-0.1.11 lib/rr/times_called_matchers/proc_matcher.rb
rr-0.1.9 lib/rr/times_called_matchers/proc_matcher.rb