Sha256: 2d374faca2264f2d415af4fd16f12f847b9f2e8c4c94b60c457ba56647001143
Contents?: true
Size: 533 Bytes
Versions: 4
Compression:
Stored size: 533 Bytes
Contents
require 'rspec-expectations' 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
4 entries across 4 versions & 1 rubygems