From: Eric Hodel Date: 2011-06-23T03:25:27+09:00 Subject: [ruby-core:37299] Re: [Ruby 1.9 - Feature #4918][Assigned] Make all core tests inherit from Test::Unit::TestCase On Jun 22, 2011, at 5:41 AM, Benoit Daloze wrote: > On 22 June 2011 07:46, Martin Bosslet wrote: >> Some tests for OpenSSL inherited from Minitest::Unit::TestCase instead of >> Test::Unit::TestCase. To be consistent, all tests should probably inherit from >> Test::Unit::TestCase (cf. [ruby-core:37275]). > > I believe some tests using MiniTest are intended to do so. > > If it's just a few using MiniTest against a lot using Test for a > particular library, it might be interesting to normalize, but I think > it is fine as is too. > > Remember they are not drop-in replacement, notably MiniTest run the > tests in random order. > >> I would scan through all tests in Ruby core and replace direct Minitest references >> except where absolutely required (rubygems, rdoc). >> >> Please let me know if there are other cases where the direct reference to Minitest >> is mandatory. > > A quick `ack -l --invert-file-match -G 'rdoc|rubygems' MiniTest test` gives: > > test/runner.rb > It's for "class Gem::TestCase < MiniTest::Unit::TestCase". So, for rubygems. > I think it should be in some helper file rather than in runner.rb > > To Rubygems maintainers: > Why is Gem::TestCase defined in test/runner.rb rather than some helper > file in test/rubygems ? Gem::TestCase is defined in lib/rubygems/test_case.rb (for reuse by RubyGems plugins and extensions). I imagine it is also defined in test/runner.rb to fix some problem when loading the combined test suite. > test/testunit/test_rake_integration.rb > test/testunit/tests_for_parallel/misc.rb > I think the references to MiniTest are intended, these tests being > about integration of MiniTest and Test. I've been working on brining rake 0.9.2 into ruby trunk and it will switch to MiniTest::Unit::TestCase