Skip to content

Instantly share code, notes, and snippets.

@elskwid
Created July 30, 2011 21:16
Show Gist options
  • Save elskwid/1116010 to your computer and use it in GitHub Desktop.
Save elskwid/1116010 to your computer and use it in GitHub Desktop.
require 'autotest/growl'
require 'autotest/timestamp'
Autotest::Growl::clear_terminal = false
Autotest.add_hook(:initialize) {|at|
# at.clear_mappings # take out the default (test/test*rb)
# stop autotest from detecting changes in these files we don't care about
%w{.git .svn .hg .swp .DS_Store ._* tmp db log tmp vendor rerun.txt Gemfile.lock}.each do |exception|
at.add_exception(exception)
end
# add mapping for files test files that end in 'test'
at.add_mapping(%r%^(test)/.*_test.rb$%) { |filename, _|
filename
}
at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m|
["test/#{m[1]}_test.rb"]
}
# option to use for unit_diff
at.unit_diff = "cat"
}
class Autotest
# thinking of how to stop a full run unless specifically asked for
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment