Skip to content

Commit

Permalink
Merge pull request #119 from watu/do_not_load_minitest
Browse files Browse the repository at this point in the history
Do not force loading minitest when test-unit is available. Closes #88.
  • Loading branch information
Gabe Berke-Williams committed Jun 15, 2012
2 parents 0f41cd5 + c75c833 commit cfd5914
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions 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 cfd5914

Please sign in to comment.