added watch task for erb files

This commit is contained in:
Mark Moser 2016-08-16 12:08:42 -05:00
parent 10d69f3664
commit de7ce04615

View File

@ -25,6 +25,11 @@ guard :minitest, spring: "bin/rails test", all_after_pass: true, all_on_start: f
# run tests when touching files matching: /lib/**/*.rb
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| ["test/lib/#{m[1]}#{m[2]}_test.rb", "test/lib/#{m[1]}#{m[2]}"] }
# run controller/integration test when touching erb files
watch(%r{^app/views/((?!_mailer).)*([^/]+)\.erb$}) { ["test/controllers", "test/integration"] }
# run mailers/integration test when touching mailer erb files
watch(%r{^app/views/(.*_mailer/)?([^/]+)\.erb$}) { ["test/mailers", "test/integration"] }
end
guard 'livereload' do