Merge pull request #1154 from ZogStriP/watch-fabricators

relaunch all the specs when a fabricator is modified
This commit is contained in:
Robin Ward 2013-07-06 17:06:01 -07:00
commit 91725c634a
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