Please sign in to comment.
Make tests for the presence of MiniTest consistent.
There is an inconsistency between the conditional logic in the definition of ActiveSupport::TestCase and the conditional logic in ActiveSupport::Testing::SetupAndTeardown . In some circumstances, it's possible for MiniTest to be defined, but for ActiveSupport::TestCase *not* to have MiniTest::Unit::TestCase or MiniTest::Assertions in its ancestor chain. e.g. in Ruby 1.8 with the minitest gem included in the bundle. In this case, the Test::Unit/MiniTest shim/wrapper is not present and so Test::Unit::TestCase (and therefore ActiveSupport::TestCase) is completely independent of MiniTest::Unit::TestCase. The conditional logic in the definition of ActiveSupport::TestCase does not take this scenario into account, whereas the logic in ActiveSupport::Testing::SetupAndTeardown does take it into account. The changes in this commit are an alternative to the change in  which was reverted in . Similar conditional logic exists in ActiveSupport::Testing::Isolation , ActiveSupport::Testing::Pending , ActiveSupport::Testing::Performance , and in their respective tests. I have not addressed these, because I know less about what's going on there, but it would be worth bringing them all into line too.  https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/testing/setup_and_teardown.rb#L13  c3e186e  267fb61  https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/testing/isolation.rb#L41  https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/testing/pending.rb#L14  https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/testing/performance.rb#L17
- Loading branch information...
Showing with 1 addition and 1 deletion.