Read about:

Posts Tagged ‘testing’

RSpec Matchers: More Than Just Assertions

(Programming)

I recently read a post from Carbon Five about RSpec best practices. The most delightful thing about it was reading it after I’d been writing a spec at work and noticing that how I was doing it was close to what was being described. It was a little bit of validation, a pat on the back for all of the reading, practicing, and thinking about BDD that I’d done to that point. But then Carbon Five asks “so what else?” Read the rest of this entry »

Autotest for Mac OS X – Now with less suck!

(Programming)

The autotest-fsevent and autotest-growl gems bring considerable improvements to ZenTest’s autotest for Mac OS X users.

autotest-fsevent teaches autotest a new trick: using FSEvent (provided in Mac OS X 10.5.x) instead of ordinary filesystem polling.  This means less CPU usage because FSEvent broadcasts filesystem changes, making active and periodic polling unnecessary.

autotest-growl enhances the Growl support that autotest comes with by adding support for Growling results for tests (using Test::Unit), specs (using RSpec), and features (using Cucumber) and adding pretty Ruby logos to the notifications.

If you use Mac OS X and autotest, I highly recommend that you try these gems out today:

sudo gem install autotest-fsevent
sudo gem install autotest-growl

One caveat: if you’re using ZenTest 4.0.0 or older, you need to do a bit of trickery to get autotest-growl to work properly.  These versions of ZenTest come with their own autotest Growl plugin, so you need to make sure you’re requiring the Growl support from autotest-growl instead of ZenTest’s own. Here’s what I ended up writing in my ~/.autotest file:

require '/Library/Ruby/Gems/1.8/gems/autotest-growl-0.1.0/lib/autotest/growl.rb'