diff options
author | James Mead <james@floehopper.org> | 2012-08-26 17:45:26 +0100 |
---|---|---|
committer | James Mead <james@floehopper.org> | 2012-11-13 08:25:14 +0000 |
commit | c3e186ec8dcb2ec26d5d56f3e89123b1350c4a6f (patch) | |
tree | ba6aead7d3c3e05002e3b69823fb6d4567b56f76 /activesupport/lib/active_support/duration.rb | |
parent | 716bdfc01d45a61d211dbd766f494cb984fc9f9c (diff) | |
download | rails-c3e186ec8dcb2ec26d5d56f3e89123b1350c4a6f.tar.gz rails-c3e186ec8dcb2ec26d5d56f3e89123b1350c4a6f.tar.bz2 rails-c3e186ec8dcb2ec26d5d56f3e89123b1350c4a6f.zip |
Use MiniTest in Ruby 1.8 if it is available.
ActiveSupport::TestCase was always inheriting from Test::Unit::TestCase.
This works fine in Ruby 1.9 where Test::Unit::TestCase is a thin wrapper
around MiniTest::Unit::TestCase, but does not work in Ruby 1.8 if the
MiniTest gem is used. What happens is that ActiveSupport inherits from
the Test::Unit::TestCase provided by the standard library, but then
since Minitest is defined, it then seems to proceed on the assumption
that ActiveSupport::TestCase has MiniTest::Unit::TestCase in its
ancestor chain. However, in this case it does not.
The fix is simply to choose which test library TestCase to inherit from
using the same logic used elsewhere to detect MiniTest.
I noticed this bug causing issues when using MiniTest and Mocha
in Ruby 1.8, but there may well be other issues.
Diffstat (limited to 'activesupport/lib/active_support/duration.rb')
0 files changed, 0 insertions, 0 deletions