Sha256: e930c279a28f31776c4a4fcb75e3336dee0cb83de36ba81b198f3f0e95729d06
Contents?: true
Size: 650 Bytes
Versions: 40
Compression:
Stored size: 650 Bytes
Contents
module RSpec module Mocks module ArgumentMatchers class ArrayIncludingMatcher def initialize(expected) @expected = expected end def ==(actual) @expected.all? do |value| if Regexp === value actual.any? {|v| value =~ v } else actual.include?(value) end end rescue NoMethodError false end def description "array_including(#{@expected.inspect})" end end def array_including(*args) ArrayIncludingMatcher.new(args.flatten) end end end end
Version data entries
40 entries across 40 versions & 1 rubygems