Thursday, January 5, 2012

Fast, Focused Ruby Koans

I really enjoy Ruby Koans by EdgeCase and recently started tinkering with watchr. If you place the following watchr script in the root directory for ruby koans watchr will run the tests AND clear the terminal window on each write so you only see the currently broken test. This has helped me to have a faster more focused workflow which makes it more fun to run through the koans more frequently and subsequently keeps you sharper.


Open up a new terminal window or split pane if you are using iTerm2 and start working through the koans. Whenever you write to the file the watchr pane will clear the window and run the tests to display the result of the first failing test.

See it in action:

Faster, focused Ruby Koans from Adam Lowe on Vimeo.

Video showing ruby koans with watchr in split pane iTerm2.