relaunch all the specs when a fabricator is modified

This commit is contained in:
Régis Hanol 2013-07-06 19:05:23 +02:00
parent 88ca51bb00
commit 6d1d887b96
1 changed files with 4 additions and 2 deletions

View File

@ -23,6 +23,9 @@ class Autospec::Runner
# Capybara request specs
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
# Fabrication
watch(%r{^spec/fabricators/(.+)_fabricator\.rb$}) { "spec" }
RELOAD_MATCHERS = Set.new
def self.watch_reload(pattern)
RELOAD_MATCHERS << pattern
@ -31,7 +34,6 @@ class Autospec::Runner
watch_reload('spec/spec_helper.rb')
watch_reload('config/(.*).rb')
def self.run(opts={})
self.new.run(opts)
end