Skip to content

Commit

Permalink
Add an .autotest file.
Browse files Browse the repository at this point in the history
  • Loading branch information
bernd committed Oct 18, 2011
1 parent cb5f51d commit a6eb4e8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .autotest
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'autotest/restart'

Autotest.add_hook :initialize do |at|
at.testlib = 'minitest/autorun'
at.order = :natural
at.libs = '.:lib:spec'

at.clear_mappings

at.add_mapping(%r{^spec/.*_spec\.rb$}) do |filename, _|
filename
end

at.add_mapping(%r{^lib/(.*)\.rb$}) do |_, m|
["spec/#{m[1].gsub('fpm/cookery/', '')}_spec.rb"]
end

at.add_mapping(%r{^spec/spec_helper\.rb$}) do
at.files_matching %r{^spec/.*_spec\.rb$}
end
end

0 comments on commit a6eb4e8

Please sign in to comment.