Removing MiniTest warnings from Rails 4 projects

Warnings like those below may originate from rspec Show archive.org snapshot or shoulda-matchers or other gems that have not updated yet to the new MiniTest API.

One

Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
# (backtrace)

Solution: Add gem 'minitest' to your Gemfile, before any rspec gem.

Another

MiniTest::Unit::TestCase is now Minitest::Test. From /Users/makandra/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/test/unit/testcase.rb:8:in `<module:Unit>'

In order to remove this message, you'd have to update the gem that makes the API call, I'm afraid.

Dominik Schöler