Sha256: 46b920f6fa8937a72fce315d449d7475cb441103c15ac4ea069597fdf2ffe163
Contents?: true
Size: 459 Bytes
Versions: 18
Compression:
Stored size: 459 Bytes
Contents
module Fakes class CombinedArgMatcher attr_reader :all_matchers def initialize(options = {}) @all_matchers = options.fetch(:matchers,[]) end def matches?(args) matches = true for index in 0..@all_matchers.count - 1 matches &= @all_matchers[index].matches?(args[index]) return false unless matches end matches end def add(matcher) @all_matchers << matcher end end end
Version data entries
18 entries across 18 versions & 1 rubygems