Rapid TDD in OSX
Sunday, April 30th, 2006
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:
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)
