Skip to content
This repository
Ryan Davis zenspider
file 25 lines (19 sloc) 0.513 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# -*- ruby -*-

# require 'autotest/restart'

ENV['GEM_PATH'] = "tmp/isolate/ruby-1.8"

module Autotest::Restart
  Autotest.add_hook :updated do |at, *args|
    if args.flatten.include? ".autotest" then
      warn "Detected change to .autotest, restarting"
      cmd = %w(autotest)
      cmd << " -v" if $v
      cmd += ARGV

      exec(*cmd)
    end
  end
end

Autotest.add_hook :initialize do |at|
  at.add_exception 'tmp'
  at.testlib = "minitest/autorun"

  at.find_directories = ARGV unless ARGV.empty?
end
Something went wrong with that request. Please try again.