01 Jun 2012, 11:58
Generic-user-small

Andrew Cox (2 posts)

It frequently says that “tests should be green” in the book, but I’m not seeing colored output. Is that just a metaphor for “passing” rather than an actual color? Should I be seeing colored output? Or do I need a gem like purdytest or turn?

I’m running in Terminal on OS X Lion with Ruby 1.9.2p290.

01 Jun 2012, 12:08
Generic-user-small

Andrew Cox (2 posts)

I may have answered my own question. Looking at rails/test_help, it tries to use ‘turn’ if it’s available:

https://github.com/rails/rails/blob/master/railties/lib/rails/test_help.rb

So if I add ‘turn’ and ‘minitest’ to my Gemfile, I get colored output with turn:

gem "turn"
gem "minitest"

Is that the recommended way to color the output of the tests? I know there are other options like minitest/pride and purdytest.

  You must be logged in to comment