Hello,

On 22 June 2011 07:46, Martin Bosslet <Martin.Bosslet / googlemail.com> 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/benchmark/test_benchmark.rb
  This is using MiniTest::Spec, and it is intended.

test/fiddle/helper.rb
  This affects all Fiddle tests, not sure it should change

test/minitest/test_minitest_benchmark.rb
test/minitest/test_minitest_mock.rb
test/minitest/test_minitest_spec.rb
test/minitest/test_minitest_unit.rb
  Of course, MiniTest's own tests are written using itself

test/net/smtp/test_response.rb
test/net/smtp/test_smtp.rb
test/net/smtp/test_ssl_socket.rb
  Can likely be changed, especially since other tests from net/ are using Test

test/profile_test_all.rb
  Can not be changed, used for profiling

test/psych/helper.rb
  This affects all Psych tests, it should not change.
  It's Aaron's decision whether to use MiniTest

test/psych/test_to_yaml_properties.rb
  Should probably use the Psych::TestCase instead of MiniTest::Unit::TestCase

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

test/syck/test_struct.rb
  Should likely be changed

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.

--

To Rubygems maintainers:
Why is Gem::TestCase defined in test/runner.rb rather than some helper
file in test/rubygems ?

Hope it helps,
B.D.