Setting up Minitest in Rails
This is my memo on Setting up Minitest in Rails.
MiniTest reporters
It gets the default Rails tests to show red and green at the appropriate times.
- Include the
minitest-reporters
gem. - Configure the test by adding these few lines to the
test/test_helper.rb
file.
Automated tests with Guard
- Include the
guard
gem in the Gemfile. - Initialize it by running
$ bundle exec guard init
. -
Edit the resulting Guardfile so that Guard will run the right tests. [Example]
- Open a new terminal and run it at the command line as follows:
$ bundle exec guard # start
$ quit # exit