Now that's testing in style!
Grab the pastie.
RedGreen Tests with Autotest & Growl Revisited
Posted by labrat
Atmos.org got me curious about revisiting Redgreen with Growl and Autotest.
I've been happily using Rob Sanheim's hack but since it involves modifying the autotest gem itself, it will surely break when a new version comes out.
Autotest 3.3.0 comes with a wonderful plugin mechanism. They basically give you a bunch of hooks you can load into the Autotest class as modules by creating a file called ".autotest" either in your computer's root or in the project root folder.
Of course, we all know that Ruby is a VERY dynamic language. So instead of defining a module and using the standard hooks, I just redefined a method by pasting Rob's code as a new Class Autotest definition and ripped off the Growl notification code included in the Autotest lib file.
I also tweaked Growl preferences and priorities so even the Growl notification turns red when tests fails.
Now that's testing in style!
Grab the pastie.
Now that's testing in style!
Grab the pastie.
