Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this MiniTest::Unit::TestCase warning mean?

My tests were running without problems, when suddenly the following warning appeared:

MiniTest::Unit::TestCase is now Minitest::Test

This was reported in the following libs:

ruby-1.9.3-p392/lib/ruby/1.9.1/test/unit/testcase.rb:8:in `<module:Unit>'
gems/activesupport-3.2.12/lib/active_support/test_case.rb:12:in `<module:ActiveSupport>'
gems/activesupport-3.2.12/lib/active_support/descendants_tracker.rb:34:in `inherited'

I have no idea what prompted these warnings to appear. Does anybody know what I can do to eliminate the warnings?

The test still appear to run fine, even with the warnings.

My Rails environmentis 3.2.12, running on OSX 10.8.4.

Thanks!

like image 217
Dave Isaacs Avatar asked Jul 04 '13 03:07

Dave Isaacs


3 Answers

You must have upgraded to minitest 5.0. MiniTest::Unit::TestCase was renamed to Minitest::Test. Here are the release notes.

like image 53
blowmage Avatar answered Nov 12 '22 22:11

blowmage


Another possibility: you're using a newer version of ruby. I was getting this warning/error running on ruby 2.1.2 (even with minitest 4.7.5); downgrading to ruby 2.0.0 resolved it

like image 43
Justin Stern Avatar answered Nov 12 '22 22:11

Justin Stern


You can use the new gem version of test-unit and minitest together. Example:

gem "test-unit", "~> 3.0"
gem "minitest", "~> 5.5"
like image 2
1Rhino Avatar answered Nov 12 '22 22:11

1Rhino