Sha256: 854baf8accb3d4b263df2f5e014b2a928a144ae5a1b945ce70b645b5483b682b

Contents?: true

Size: 482 Bytes

Versions: 7

Compression:

Stored size: 482 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
      self.arg_sets << args
    end

    def matches?(args)
      return true
    end

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fakes-1.1.5 lib/fakes/ignore_set.rb
fakes-1.1.4 lib/fakes/ignore_set.rb
fakes-1.1.3 lib/fakes/ignore_set.rb
fakes-1.1.2 lib/fakes/ignore_set.rb
fakes-1.1.1 lib/fakes/ignore_set.rb
fakes-1.1.0 lib/fakes/ignore_set.rb
fakes-1.0.9 lib/fakes/ignore_set.rb