This project is archived and is in readonly mode.
ActiveSupport::Testing::SetupAndTeardown::ForMiniTest gets accidentally included
Reported by Matthias Hennemeyer | February 4th, 2009 @ 10:00 AM
In active_support/testing/setup_and_teardown.rb:11, there is a conditional that decides on the value of defined?(MiniTest) if ForMiniTest or ForClassicTestUnit will be included.
If there are both minitest and mocha present (as gems), the mentioned decision will always be taken in favor of MiniTest, because mocha requires minitest/unit (if it is present).
This situation will yield an error when ForMiniTest#run tells the TestUnit Result to puke. Because this is something only the MiniTest Runner is capable of.
The attached patch tightens the condition for ActiveSupport::Testing::SetupAndTeardown::ForMiniTest to be included into ActiveSupport::Testing::SetupAndTeardown. Instead of just looking for MiniTest it checks if MiniTest::Assertions are included into TestCase.
I'have tested it with ruby 1.8.6, edge rails (b302e023) and both plain t/u and minitest_tu_shim compatibility mode.
Matthias
Comments and changes to this ticket
-
DHH February 6th, 2009 @ 02:02 PM
- Assigned user set to Jeremy Kemper
-
Jeremy Kemper February 6th, 2009 @ 05:00 PM
- Milestone cleared.
-
Repository February 6th, 2009 @ 06:06 PM
- State changed from new to committed
(from [86dd2f841d29b326cc480e9c58de63f54799d2c1]) Tightening the condition for including ActiveSupport::Testing::SetupAndTeardown::ForMiniTest.
[#1871 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 1871 ActiveSupport::Testing::SetupAndTeardown::ForMiniTest gets accidentally included [#1871 state:committed]