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

Version Path
pacer-1.5.2-java spec/support/matchers.rb
pacer-1.5.1-java spec/support/matchers.rb
pacer-1.4.2-java spec/support/matchers.rb
pacer-1.4.1-java spec/support/matchers.rb
pacer-1.4.0-java spec/support/matchers.rb
pacer-1.3.5-java spec/support/matchers.rb
pacer-1.3.4-java spec/support/matchers.rb
pacer-1.3.3-java spec/support/matchers.rb
pacer-1.3.2-java spec/support/matchers.rb
pacer-1.3.1-java spec/support/matchers.rb
pacer-1.2.0-java spec/support/matchers.rb