Rapid TDD in OSX

I’ve been looking into and adopting Test Driven Development lately, and I’ve run across some neat tools that can improve the TDD experience a good deal. stakeout is a program that utilizes some native OSX tricks to run a script every time a file is changed.

I wrote a bit of ruby (along the lines of gstakeout) that ties together the OSX notification manager Growl with Ruby’s unit testing framework. It’s just a little hack that adds a couple of lines into the command line test runner of unit/test, but I found it to improve TDD on little projects so much that I made a short screencast showing it off:

Growlrunner Thumbnail

This could be improved by integrating it into autotest, which has the nice property that it only tests methods that need to be tested.

edit: Usage: Add this to the end of your test script:

require 'growlrunner'
runner = Test::Unit::UI::Growl::TestRunner.new(YourTestClassGoesHere)
runner.start

If you do this, it’ll work with autotest, and in Rails projects.

Requirements: RubyCocoa
Download growlrunner.rb (updated 5-2-2006)

Blog software change

I’ll try to keep the metablogging to a minimum, but I figured I might as well note that I’ve changed blog software from Typo to Wordpress.  Typo’s given me a bit of trouble in the past, but the real reason I switched was the annoying random Application Errors that plague Rails apps.  I’m just not interested in debugging my blogging software.  One thing I’ll give php over rails is that it is considerably easier to deploy someone else’s php app.  No fiddling around with .htaccess or fcgi.

Perhaps The Conductor will smooth this over, if it’s ever released.