.autotest 513 B

1234567891011121314151617181920212223242526
  1. # -*- ruby -*-
  2. # require 'autotest/restart'
  3. ENV['GEM_PATH'] = "tmp/isolate/ruby-1.8"
  4. module Autotest::Restart
  5. Autotest.add_hook :updated do |at, *args|
  6. if args.flatten.include? ".autotest" then
  7. warn "Detected change to .autotest, restarting"
  8. cmd = %w(autotest)
  9. cmd << " -v" if $v
  10. cmd += ARGV
  11. exec(*cmd)
  12. end
  13. end
  14. end
  15. Autotest.add_hook :initialize do |at|
  16. at.add_exception 'tmp'
  17. at.testlib = "minitest/autorun"
  18. at.find_directories = ARGV unless ARGV.empty?
  19. end