Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created October 18, 2008 19:47
Show Gist options
  • Save dchelimsky/17727 to your computer and use it in GitHub Desktop.
Save dchelimsky/17727 to your computer and use it in GitHub Desktop.
Autotest.add_hook :initialize do |at|
unless ARGV.empty?
if Dir["app"].empty?
at.find_directories = ARGV.length == 1 ? ["spec/#{ARGV.first}","lib/#{ARGV.first}"] : ARGV.dup
else
at.find_directories = ARGV.length == 1 ? ["spec/#{ARGV.first}","app/#{ARGV.first}"] : ARGV.dup
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment