public
Description: Fixtures aren't fun. Machinist is.
Homepage:
Clone URL: git://github.com/notahat/machinist.git
Kevin Bullock (author)
Thu Oct 15 08:19:59 -0700 2009
notahat (committer)
Sat Oct 31 22:36:56 -0700 2009
machinist / .autotest
100644 8 lines (6 sloc) 0.301 kb
1
2
3
4
5
6
7
8
Autotest.add_hook :initialize do |at|
  at.clear_mappings
  
  at.add_mapping(%r%^spec/(.*)_spec.rb$%) {|filename, _| filename }
  at.add_mapping(%r%^lib/(.*).rb$%) {|_, match| "spec/#{match[1]}_spec.rb" }
  at.add_mapping(%r%^spec/spec_helper.rb$%) { at.files_matching(%r%^spec/(.*)_spec.rb$%) }
end