Sha256: 7299cb9a4afc0b8ca835c75f267256edc06570679c6936ed8e1482f4763a02cb

Contents?: true

Size: 577 Bytes

Versions: 18

Compression:

Stored size: 577 Bytes

Contents

module Shoulda
  module Matchers
    if Gem.ruby_version >= Gem::Version.new('1.8') && Gem.ruby_version < Gem::Version.new('1.9')
      require 'test/unit'
      AssertionError = Test::Unit::AssertionFailedError
    elsif defined?(Test::Unit::AssertionFailedError)
      # Test::Unit has been loaded already, so we use it
      AssertionError = Test::Unit::AssertionFailedError
    elsif Gem.ruby_version >= Gem::Version.new("1.9")
      require 'minitest/unit'
      AssertionError = MiniTest::Assertion
    else
      raise 'No unit test library available'
    end
  end
end

Version data entries

18 entries across 17 versions & 2 rubygems

Version Path
shoulda-matchers-2.5.0 lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-2.4.0 lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-2.4.0.rc1 lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-2.3.0 lib/shoulda/matchers/assertion_error.rb
challah-1.0.0 vendor/bundle/gems/shoulda-matchers-2.2.0/lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-2.2.0 lib/shoulda/matchers/assertion_error.rb
challah-1.0.0.beta3 vendor/bundle/gems/shoulda-matchers-2.1.0/lib/shoulda/matchers/assertion_error.rb
challah-1.0.0.beta3 vendor/bundle/gems/shoulda-matchers-1.5.6/lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-2.1.0 lib/shoulda/matchers/assertion_error.rb
challah-1.0.0.beta2 vendor/bundle/gems/shoulda-matchers-1.5.6/lib/shoulda/matchers/assertion_error.rb
challah-1.0.0.beta vendor/bundle/gems/shoulda-matchers-1.5.6/lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-2.0.0 lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-1.5.6 lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-1.5.5 lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-1.5.4 lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-1.5.2 lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-1.5.1 lib/shoulda/matchers/assertion_error.rb
shoulda-matchers-1.5.0 lib/shoulda/matchers/assertion_error.rb