What does this MiniTest::Unit::TestCase warning me

2020-07-06 02:20发布

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!

3条回答
乱世女痞
2楼-- · 2020-07-06 02:56

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

查看更多
Rolldiameter
3楼-- · 2020-07-06 02:59

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

gem "test-unit", "~> 3.0"
gem "minitest", "~> 5.5"
查看更多
Rolldiameter
4楼-- · 2020-07-06 03:11

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

查看更多
登录 后发表回答