Sha256: 15f512bad7f6cbf5ab1f13cf38c71272adde83319e3c71f3ea77cf90e4dd4301
Contents?: true
Size: 431 Bytes
Versions: 31
Compression:
Stored size: 431 Bytes
Contents
module RSpec module Core module Matchers def fail raise_error(::RSpec::Expectations::ExpectationNotMetError) end def fail_with(message) raise_error(::RSpec::Expectations::ExpectationNotMetError, message) end end end end RSpec::Matchers.define :be_one_of do |*list| match do |item| list.include? item or list.select { |i| i.is_a? Regexp }.any? { |r| item =~ r } end end
Version data entries
31 entries across 31 versions & 1 rubygems