Skip to content

Instantly share code, notes, and snippets.

@texel
Created September 15, 2009 18:32
Show Gist options
  • Save texel/187516 to your computer and use it in GitHub Desktop.
Save texel/187516 to your computer and use it in GitHub Desktop.
require 'autotest/fsevent'
require 'autotest/growl'
Autotest::Growl::remote_notification = true
Autotest.add_hook :initialize do |at|
at.sleep = 1
%w{.svn .hg .git vendor}.each {|exception| at.add_exception(exception)}
unless ARGV.empty?
if File.exist? 'config/environment.rb'
at.find_directories = ARGV.length == 1 ? ["spec/#{ARGV.first}", "app/#{ARGV.first}"] : ARGV.dup
end
end
at.add_mapping(%r%^spec/(processors)/.*rb$%) { |filename, _| filename }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment