I'm a fan of Autotest when I'm doing Ruby development. It automatically runs your tests every time that you make a change to a file. This is handy because

  • You never, ever forget to run tests after a change.
  • You save those oh-so-important keystrokes.
  • You save those precious seconds. It doesn't seem like much, but over the course of a project those seconds add up.
  • It makes you feel like a cool kid.

However, I'm not working in a Ruby environment for my senior project; we are using Objective-J. The development style, on the other hand, is very similar. The tools are the same: Terminal, TextMate, and Web Browser. So, after manually running tests for a while, I thought "What if?"

So I dug into the source code for Autotest wondering if I could port it very quickly to Objective-J.

Autotest isn't a simple program and porting it wasn't going to be quick. So, I looked further and noticed that I could just use Autotest and run my Objective-J tests using a small override. So, all you'll need to do is drop the following code into your .autotest file in the directory of your source code. You'll need to modify the command to your needs, obviously. We have a RunTests.j file that can be run from Autotest, Rake or Jake.

[gist id="230517"]