Pretty Test

Beautiful output for minitest


Project maintained by bobes Hosted on GitHub Pages — Theme by mattgraham

Pretty Test

pretty_test is a Ruby gem that will make output from your minitest tests pretty and useful.

The problem

There are only two things I want to see while running a suite of tests: progress and failed tests.

minitest prints dots for passed tests and Fs for failed tests - not very useful. If you want to know which tests failed and why, you have to wait until the whole suite is finished. This kind of feedback is painfully slow.

Turn with the default settings brings a huge improvement by printing failed test details immediately. But it also prints one line for every passed test. So you'll often get just a glimpse of a failed test stack trace immediately replaced by a fast-scrolling list of passed tests. (I know there are other output formats in turn but I haven't found any of them very useful.)

The solution

With pretty_test you'll get

And all of this in real time.

Install

All you need to do is to add pretty_test to your Gemfile:

group :test do
  gem "pretty_test"
  # ...
end

and enjoy pretty and useful test output.