autotest -rails
I’ve been meaning to start doing TDD in my rails hacking for a while, and this weekend I finally got a start on it. Today, I discovered autotest and supercharged the red green refactor cycle!
Autotest runs continuously and watches to see what files you have edited. Any time you save a file, it will run the corresponding test within a few seconds. If a test fails, you can see the result immediately. If it passes, you can write another test, then the code necessary to make it pass, ad nauseam.
It’s seriously awesome. I really want something like this for my C# development at work. I imagine the concept wouldn’t work quite as well with a compiled language, but still — it would be sweet!