public
Description: replacement for fixtures in rails tests. sweet metaprogramming to build/create valid/default models and attribute hashes.
Homepage: http://blog.internautdesign.com/2008/6/4/factories-and-workers-plugin
Clone URL: git://github.com/dfl/factories-and-workers.git
dfl (author)
Wed Dec 10 12:28:54 -0800 2008
commit  cfec04c879181dadb5a8e715549eb1fb8462cc6e
tree    db9932c9e0ba29a46b956d2114495ae928286223
parent  c2984ee99c66c71691b59e9d02631d014d05e3ab
factories-and-workers / .autotest
100644 9 lines (7 sloc) 0.428 kb
1
2
3
4
5
6
7
8
9
Autotest.add_hook :initialize do |at|
  at.clear_mappings
 
  at.add_mapping(%r{^test/.*_test\.rb$}) {|f, _| [f] }
  at.add_mapping(%r{^lib/factories-and-workers/(.*)\.rb$}) {|_, m| ["test/#{m[1]}_test.rb"] }
  at.add_mapping(%r{^test/.*\.rb$}) { at.files_matching %r{^test/.*_test\.rb$} }
  at.add_mapping(%r{^lib/.*\.rb$}) { at.files_matching %r{^test/.*_test\.rb$} }
end