Sha256: b4d1f2c9114580ddc88f1e4a950630dd3b5648787577d5cafe5880a93f1bd594

Contents?: true

Size: 463 Bytes

Versions: 8

Compression:

Stored size: 463 Bytes

Contents

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)
      if String === message
        regexp = /#{Regexp.escape(message)}/
      else
        regexp = message
      end
      raise_error(RSpec::Expectations::ExpectationNotMetError, regexp)
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
active_model_serializers_matchers-0.2.1 spec/support/rspec_fail_matchers.rb
active_model_serializers_matchers-0.2.0 spec/support/rspec_fail_matchers.rb
rspec-change_to_now-1.2.0 spec/support/matchers.rb
rspec-change_to_now-1.1.0 spec/support/matchers.rb
rspec-change_to_now-1.0.3 spec/support/matchers.rb
rspec-change_to_now-1.0.2 spec/support/matchers.rb
rspec-change_to_now-1.0.1 spec/support/matchers.rb
rspec-change_to_now-1.0.0 spec/support/matchers.rb