Colorizing Rails Test Output
I love making things easier to read, to skim, to take in at a glance. At last night’s the ChiRb presentation on rspec I noticed the output was nicely colorized.
Hey, of course that’s easier to read. It’s also dead easy to add to your existing tests thanks to a gem by Pat Eyler, whether you call then with rake test, rake test:units, or ruby test/functional/application_controller_test.rb.
$ sudo gem install redgreen
Edit your test/test_helper.rb and add require 'redgreen' after the other requires, and you’re done. If you run your tests, you’ll see something like:
Passes are green, fails are red, errors are yellow. Here’s hoping you just see lots of green.
And rspec looks like good stuff, I’m going to add it to my test suite for NearbyGamers. The ability to test controllers without testing views (and vice-versa) will be a win.
Want more? I'm not as good at forgetting to update @pushcx on Twitter.
Conversation (0)
Jump to comment form | comments rss [?]Add this link to your feed reader to watch for new replies to this post. | trackback uri [?]Trackback this link in a blog post to create a comment here linking to your post.