I’ve been playing with autotest for my latest Rails project, and it’s great.
However, if you’re doing a “Ruby without Rails” project and your directory structure is different from the established conventions, you’re out to reverse engineer autotest itself and find outdated recommendations on Google.
It doesn’t have to be this way, here’s my .autotest:
# quit on first CTRL-c
Autotest.add_hook(:interrupt) do |at|
at.wants_to_quit = true
# run all tests for ANY file
Autotest.add_hook(:initialize) do |at|
at.add_mapping(/.*/) do |filename, _|