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 wantin开发者_Go百科g 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
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
精彩评论