Permalink
Browse files

added .autotest

  • Loading branch information...
1 parent 0a319b8 commit 10dd12f478303bd31a072aef33b6de586b071e4b @pietern committed Mar 14, 2010
Showing with 18 additions and 0 deletions.
  1. +18 −0 .autotest
View
18 .autotest
@@ -0,0 +1,18 @@
+Autotest.add_hook :initialize do |at|
+ at.clear_mappings
+
+ # scope to google_contacts directory
+ at.add_mapping(%r%^lib/google_contacts/(.*)\.rb$%) do |_, m|
+ at.files_matching %r%^spec/#{m[1]}_spec\.rb$%
+ end
+
+ # run specs on change
+ at.add_mapping(%r%^spec/(.*)_spec\.rb$%) do |filename, _|
+ filename
+ end
+
+ # run all specs when helper changes
+ at.add_mapping(%r%^spec/spec_helper\.rb$%) do
+ at.files_matching %r%^spec/.*_spec\.rb$%
+ end
+end

0 comments on commit 10dd12f

Please sign in to comment.