Permalink
Browse files

Do not force loading minitest when test-unit is available. Closes tho…

  • Loading branch information...
pupeno committed Jun 15, 2012
1 parent 0f41cd5 commit c75c8334919772a8c09e6bcc8af4cdb8d0bc1d8f
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/shoulda/matchers/assertion_error.rb
@@ -1,11 +1,12 @@
module Shoulda
module Matchers
if RUBY_VERSION > "1.9"
if defined?(Test::Unit::AssertionFailedError)
AssertionError = Test::Unit::AssertionFailedError
elsif Gem.ruby_version >= Gem::Version.new("1.9")
require 'minitest/unit'
AssertionError = MiniTest::Assertion
else
require 'test/unit/assertionfailederror'
AssertionError = Test::Unit::AssertionFailedError
raise "No unit test library available"
end
end
end
end

0 comments on commit c75c833

Please sign in to comment.