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

Answers


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


You can get human-friendly output (not as nice as RSpec's, but workable) by simply passing the --verbose or -v flag to Ruby:

$ ruby -v test/your_test.rb

If you're using Rake::TestTask to run your Shoulda tests, there's an environment variable for passing options:

$ TESTOPTS='--verbose' rake

Need Your Help

Deleting multiple labels in perforce

perl perforce labels

I am working on a perforce-perl script that creates labels. Due to repeated execution of the script i have created hundreds of labels of the type LABEL_A.180 etc.

How do I write a SQL query to select rows from an ODBC source?

sql sql-server odbc

I'm fairly new to SQL, and MSSQL in particular. I'm looking for a way to select certain rows from an ODBC data source I have already set up into a table. Something along the lines of: