After install ruby 2.1.2 on my Macbook Pro, I found the default minitest version is 4.7.5
, I do sodo gem install minitest
to install minitest 5.4.2
, but the default gem is 4.7.5
yet. I also do gem cleanup
,that didn't remove the old version.I had try gem uninstall minitest -v 4.7.5
and got
RROR: While executing gem ... (Gem::InstallError)
gem "minitest" cannot be uninstalled because it is a default gem
So how can I change the default gem to version 5.4.2 and remove the old one?
If I don't change this, I have to write class AbcTest < MiniTest::Unit::TestCase
not class AbcTest < Minitest::Test
in my test. Or modify Gemfile everytime I create a new project.
PS:
Ruby version: ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
gem list minitest -d
minitest (5.4.2, 4.7.5)
Author: Ryan Davis
Homepage: https://github.com/seattlerb/minitest
License: MIT
Installed at (5.4.2): /Users/xxxxx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0
(4.7.5, default): /Users/xxxxx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0
minitest provides a complete suite of testing facilities supporting
TDD, BDD, mocking, and benchmarking