forked from guard/listen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Guardfile
26 lines (23 loc) · 1.04 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
24
25
26
ignore(%r{spec/\.fixtures/})
group :specs, halt_on_fail: true do
guard :rspec, cmd: 'bundle exec rspec -t ~acceptance', failed_mode: :keep, all_after_pass: true do
watch(%r{^spec/lib/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^spec/support/*}) { 'spec' }
watch('spec/spec_helper.rb') { 'spec' }
end
guard :rubocop, all_on_start: false, cli: '--rails' do
watch(%r{.+\.rb$}) { |m| m[0] }
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
watch(%r{(?:.+/)?\.rubocop_todo\.yml$}) { |m| File.dirname(m[0]) }
end
# TODO: guard rspec should have a configurable file for this to work
# TODO: also split up Rakefile
guard :rspec, cmd: 'bundle exec rspec -t acceptance', failed_mode: :keep, all_after_pass: true do
watch(%r{^spec/lib/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^spec/support/*}) { 'spec' }
watch('spec/spec_helper.rb') { 'spec' }
watch(%r{^spec/acceptance/.+_spec\.rb$})
end
end