Sha256: f683c4dd633835c64391197d346496e825cf64567d821f37212a0feafd45c5e6

Contents?: true

Size: 473 Bytes

Versions: 2

Compression:

Stored size: 473 Bytes

Contents

module Fakes
  class IgnoreSet
    include ArgBehaviour

    def initialize
      @times_called = 0
    end

    def arg_sets
      @arg_sets ||= []
    end

    def capture_args(args)
      @times_called += 1
      arg_sets << args
    end

    def matches?(args)
      return true
    end

    def was_called_with?(args)
      matcher = ArgMatchFactory.create_arg_matcher_using(args)
      return @arg_sets.select{|set| matcher.matches?(set)}.count > 0
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fakes-1.0.25 lib/core/ignore_set.rb
fakes-1.0.22 lib/core/ignore_set.rb