Skip to content

Instantly share code, notes, and snippets.

@shripadk
Created August 30, 2010 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shripadk/557379 to your computer and use it in GitHub Desktop.
Save shripadk/557379 to your computer and use it in GitHub Desktop.
Autotest hooks
Autotest.add_hook(:initialize) {|at|
at.add_exception %r{^\.git} # ignore Version Control System
at.add_exception %r{^./tmp} # ignore temp files, lest autotest will run again, and again...
# at.clear_mappings # take out the default (test/test*rb)
at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
Dir['spec/**/*.rb']
}
nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment