Skip to content
Browse files

Options to make autotest work better. Thanks Geoffrey Dagley!

  • Loading branch information...
1 parent 85a23cb commit c1e552b7620bf1e53cc259246f87eeb55107602a @sam sam committed
Showing with 23 additions and 0 deletions.
  1. +22 −0 .autotest
  2. +1 −0 spec/spec.opts
View
22 .autotest
@@ -0,0 +1,22 @@
+Autotest.add_hook :initialize do |at|
+ ignore = %w{.git burn www log plugins script tasks bin CHANGELOG FAQ MIT-LICENSE PERFORMANCE QUICKLINKS README}
+ unless ENV['AUTOTEST'] == 'integration'
+ ignore << 'spec/integration'
+ end
+
+ ignore.each do |exception|
+ at.add_exception(exception)
+ end
+
+ at.clear_mappings
+ at.add_mapping(%r%^spec/.*\.rb$%) { |filename, _|
+ filename
+ }
+ at.add_mapping(%r%^lib/data_mapper/(.*)\.rb$%) { |_, m|
+ ["spec/#{m[1]}_spec.rb"]
+ }
+ at.add_mapping(%r%^spec/spec_helper.rb$%) {
+ at.files_matching %r%^spec/.*_spec\.rb$%
+ }
+
+end
View
1 spec/spec.opts
@@ -0,0 +1 @@
+--require spec/spec_helper

0 comments on commit c1e552b

Please sign in to comment.
Something went wrong with that request. Please try again.