-
Notifications
You must be signed in to change notification settings - Fork 39
/
Guardfile
18 lines (15 loc) · 908 Bytes
/
Guardfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard :test, all_after_pass: false, all_on_start: false do
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^test/.+_test\.rb$})
watch('test/test_helper.rb') { "test" }
# Rails example
watch(%r{^app/models/(.+)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
watch(%r{^app/helpers/(.+)\.rb$}) { |m| "test/unit/helpers/#{m[1]}_test.rb" }
watch(%r{^app/controllers/(.+)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
watch(%r{^app/mailers/(.+)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
watch(%r{^app/views/.+\.rb$}) { "test/integration" }
watch('app/controllers/application_controller.rb') { ["test/functional", "test/integration"] }
watch('lib/tasks/odc.rake') { "test/unit/odc_rake_test.rb" }
end