-
Notifications
You must be signed in to change notification settings - Fork 7
/
Guardfile
23 lines (20 loc) · 1.06 KB
/
Guardfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch(%r{^config/locales/.+\.yml$})
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb')
end
guard 'rspec', cli: '--drb --format Fuubar --color', all_on_start: false, all_after_pass: false do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)\.rb}) { |m| "spec/requests/#{m[1]}_spec.rb" }
watch(%r{^app/decorators/(.+)_decorator\.rb$}) { |m| "spec/requests/#{m[1]}_controller_spec.rb" }
watch('app/controllers/application_controller.rb') { "spec/requests" }
watch(%r{^spec/requests/support/views/(.+)_view\.rb$}) { |m| "spec/requests/#{m[1]}_controller_spec.rb" }
end