Do not force loading minitest when test-unit is available. Closes #88.
Credit goes to Matt Conway (@wr0ngway https://github.com/wr0ngway)
This commit is contained in:
parent
0f41cd521c
commit
c75c833491
|
@ -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
|
Loading…
Reference in New Issue