Sha256: 42ce1521574fe9c980b95ef554f0e6a209f30597c98082c2523cdb939721f4fa

Contents?: true

Size: 503 Bytes

Versions: 11

Compression:

Stored size: 503 Bytes

Contents

RSpec::Matchers.define :include_method do |expected|
  match do |actual|
    actual.map { |m| m.to_s }.include?(expected.to_s)
  end
end

module RSpec
  module Matchers
    def fail
      raise_error(RSpec::Expectations::ExpectationNotMetError)
    end

    def fail_with(message)
      raise_error(RSpec::Expectations::ExpectationNotMetError, message)
    end

    def fail_matching(message)
      raise_error(RSpec::Expectations::ExpectationNotMetError, /#{Regexp.escape(message)}/)
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rspec-collection_matchers-1.2.1/spec/support/matchers.rb
rspec-collection_matchers-1.2.1 spec/support/matchers.rb
rspec-collection_matchers-1.2.0 spec/support/matchers.rb
rspec-collection_matchers-1.1.3 spec/support/matchers.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/rspec-collection_matchers-1.1.2/spec/support/matchers.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/rspec-collection_matchers-1.1.2/spec/support/matchers.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/rspec-collection_matchers-1.1.2/spec/support/matchers.rb
rspec-collection_matchers-1.1.2 spec/support/matchers.rb
rspec-collection_matchers-1.1.1 spec/support/matchers.rb
rspec-collection_matchers-1.1.0 spec/support/matchers.rb
rspec-collection_matchers-1.0.0 spec/support/matchers.rb