Support for minitest 5.0.0 #35

krainboltgreene opened this Issue Jun 9, 2013 · 8 comments


None yet

7 participants


Doesn't work with latest minitest.


more info. From a rails 4.1b and ruby 2.1 project:

/home/nick/.gems/gems/m-1.3.2/lib/m.rb:231:in `suites': undefined method `test_suites' for Minitest::Unit::TestCase:Class (NoMethodError)
    from /home/nick/.gems/gems/m-1.3.2/lib/m.rb:256:in `tests'
    from /home/nick/.gems/gems/m-1.3.2/lib/m.rb:181:in `execute'
    from /home/nick/.gems/gems/m-1.3.2/lib/m.rb:121:in `run'
    from /home/nick/.gems/gems/m-1.3.2/lib/m.rb:106:in `run'
    from /home/nick/.gems/gems/m-1.3.2/bin/m:4:in `<top (required)>'
    from /home/nick/.gems/bin/m:23:in `load'
    from /home/nick/.gems/bin/m:23:in `<main>'

Also, trying to run the tests under ruby 2.1:

$ rake
WARNING: Pygments not found. Using webservice.
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
  /usr/local/lib/ruby/2.1.0/test/unit.rb:1:in `<top (required)>'
  /home/nick/workspace/m/test/test_helper.rb:8:in `<top (required)>'
  /home/nick/workspace/m/test/active_support_test.rb:1:in `<top (required)>'
  /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
  /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:9:in `each'
  /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:9:in `block in <main>'
  /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:4:in `select'
  /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:4:in `<main>'
MiniTest::Unit::TestCase is now Minitest::Test. From /usr/local/lib/ruby/2.1.0/test/unit/testcase.rb:8:in `<module:Unit>'
/usr/local/lib/ruby/2.1.0/test/unit.rb:676:in `<class:Runner>': undefined method `_run_suite' for class `Test::Unit::Runner' (NameError)
    from /usr/local/lib/ruby/2.1.0/test/unit.rb:261:in `<module:Unit>'
    from /usr/local/lib/ruby/2.1.0/test/unit.rb:15:in `<module:Test>'
    from /usr/local/lib/ruby/2.1.0/test/unit.rb:7:in `<top (required)>'
    from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/nick/workspace/m/test/test_helper.rb:8:in `<top (required)>'
    from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/nick/workspace/m/test/active_support_test.rb:1:in `<top (required)>'
    from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
    from /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:9:in `each'
    from /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:9:in `block in <main>'
    from /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:4:in `select'
    from /home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [ruby -I"lib:test" -I"/home/nick/.gems/gems/rake-10.1.1/lib" "/home/nick/.gems/gems/rake-10.1.1/lib/rake/rake_test_loader.rb" "test/*_test.rb" ]

Tasks: TOP => default => test
(See full trace by running task with --trace)

Looks like MT 5 brings some api breaks, which makes sense. Also, m's Gemfile.lock uses minitest 2.11.4, but it looks like the tests are running w/ ruby 2.1's built-in minitest, which is 5 I think.

tjschuck commented Mar 3, 2014

This seems to be the problematic line under MT 5:

The MT 5 equivalent seems to be Minitest::Runnable.runnables

ANorwell commented Oct 6, 2014

This change resolved this issue for me:


However, this causes the tests to fail to run.

Anyone aware of a working fork?

ANorwell commented Nov 7, 2014

If your goal is just to be able to use m with minitest 5, the above branch accomplishes that. I don't believe there's any other fork that has properly integrated a fix.

Oh I see - the gem's tests fail to run. Thanks.

I believe this was closed with 1.3.3 :D

zamith commented Apr 26, 2015

That is correct. It should be working fine. If you have any problems with it, please open issue.

I'll be closing this issue in favor of #43. Thanks everyone for the feedback.

@zamith zamith closed this Apr 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment