Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 873 Bytes

colorful-output-with-minitest.md

File metadata and controls

26 lines (20 loc) · 873 Bytes

Colorful Output With MiniTest

Ruby's MiniTest is a minimal testing framework that you can easily drop-in to any Ruby project. For those used to using RSpec with it's fancy red/green output, MiniTest can be a little disappointing. It prints boring, uncolored text to the screen that lacks visual feedback. Fortunately, red and green coloring can be added with minitest/reporters.

Update your Gemfile:

gem 'minitest-reporters'

Then require and configure minitest-reporters in your testing setup file (e.g. test/test_helper.rb):

require 'minitest/reporters'
Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(:color => true)]

You can now enjoy that Red, Green, Refactor cycle.