public
Description: my configuration files
Homepage:
Clone URL: git://github.com/fnando/dotfiles.git
dotfiles / autotest
100644 18 lines (14 sloc) 0.462 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'test_notifier/autotest'
require 'autotest/timestamp'
 
Autotest.add_hook :initialize do |at|
 at.sleep = 5
 
 # Ignore files with suffix
 %w{.svn .hg .git .erb .png .txt .sh .project .rjs .rake .jpg .xml .xlst}.each do |exception|
   at.add_exception(exception)
 end
 
 # run autotest for specific directory
 # autotest models
 unless ARGV.empty?
   at.find_directories = ARGV.length == 1 ? ["spec/#{ARGV.first}","app/#{ARGV.first}"] : ARGV.dup
 end
end