Search code examples
ruby-on-railsrubycolorsrspecshoulda

How to make 'Shoulda' test output easier to read and in Colour!


I currently working on a project which uses Spree Cart and which has hence forced me to switch from testing with RSpec to testing with Shoulda.

I really like the output I get from rspec and am wanting to get similarly readable output using Shoulda.

Specifically how do I achieve similar output as I would achieve with the rspec command below using shoulda?

$ spec spec --color --format specdoc

Solution

  • Shoulda is a library within Test::Unit. You can get colored Test::Unit output by installing the redgreen gem

    http://github.com/mynyml/redgreen/blob/master/README