mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:11:08 -06:00
relaunch all the specs when a fabricator is modified
This commit is contained in:
parent
88ca51bb00
commit
6d1d887b96
@ -11,7 +11,7 @@ class Autospec::Runner
|
||||
end
|
||||
|
||||
watch(%r{^spec/.+_spec\.rb$})
|
||||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/components/#{m[1]}_spec.rb" }
|
||||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/components/#{m[1]}_spec.rb" }
|
||||
|
||||
# Rails example
|
||||
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user