Today I Learned How to replace minitest-reporters with minitest-rg in the Ruby on Rails Tutorial 3rd ed
TODO: Figure out why this isn't working in MDX
<<link|Michael Hartl](http://www.michaelhartl.com) uses the [minitest-reporters](https://github.com/kern/minitest-reporters) gem to colorize test results in the third edition of the excellent [Ruby on Rails Tutorail](https://www.railstutorial.org). I prefer [minitest-rg|https://github.com/blowmage/minitest-rg>>. To use it instead:
{% capture codeA %}
ruby{numberLines: true}
require 'minitest/reporters'
Minitest::Reporters.use!
{% endcapture %}
html
<ol>
<li>
Remove (or just don't add) these lines to <code>test/test_helper.rb</code>:<br /><br />
require 'minitest/reporters'
Minitest::Reporters.use!
</li>
<li>
Replace this section of the <code>Gemfile</code>:<br /><br />
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
end
<br />
With this:<br />
group :test do
gem 'minitest', '5.7.0'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
gem 'minitest-rg', '5.1.0'
end
The order is important. Calling <code>minitest-rg</code> earlier causes problems.
</li>
</ol>
~ fin ~