Improve route changes handling under guard/spork

This commit is contained in:
Thibault Jouan 2015-05-01 17:19:39 +00:00
parent f49f04b650
commit 86bec28457
2 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,6 @@ directories %w[app config spec]
guard :spork, rspec_env: { RAILS_ENV: 'test' } do guard :spork, rspec_env: { RAILS_ENV: 'test' } do
watch('config/application.rb') watch('config/application.rb')
watch('config/environment.rb') watch('config/environment.rb')
watch('config/routes.rb')
watch(%r{^config/environments/.+\.rb$}) watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$}) watch(%r{^config/initializers/.+\.rb$})
watch('spec/spec_helper.rb') watch('spec/spec_helper.rb')
@ -13,6 +12,7 @@ end
guard :rspec, cmd: 'bundle exec rspec --drb -f doc' do guard :rspec, cmd: 'bundle exec rspec --drb -f doc' do
watch(%r{^spec/.+_spec\.rb$}) watch(%r{^spec/.+_spec\.rb$})
watch('config/routes.rb') { 'spec' }
watch('spec/spec_helper.rb') { 'spec' } watch('spec/spec_helper.rb') { 'spec' }
watch(%r{^spec/support/.+\.rb$}) { 'spec' } watch(%r{^spec/support/.+\.rb$}) { 'spec' }
watch('spec/factories.rb') { 'spec' } watch('spec/factories.rb') { 'spec' }

View File

@ -18,5 +18,6 @@ Spork.prefork do
end end
Spork.each_run do Spork.each_run do
Rails.application.reload_routes!
FactoryGirl.reload FactoryGirl.reload
end end