| 1 |
ignore(%r{spec/\.fixtures/}) |
| 2 |
|
| 3 |
group :specs, halt_on_fail: true do |
| 4 |
guard :rspec, cmd: 'bundle exec rspec -t ~acceptance', failed_mode: :keep, all_after_pass: true do |
| 5 |
watch(%r{^spec/lib/.+_spec\.rb$}) |
| 6 |
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } |
| 7 |
watch(%r{^spec/support/*}) { 'spec' } |
| 8 |
watch('spec/spec_helper.rb') { 'spec' } |
| 9 |
end |
| 10 |
|
| 11 |
guard :rubocop, all_on_start: false, cli: '--rails' do |
| 12 |
watch(%r{.+\.rb$}) { |m| m[0] } |
| 13 |
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) } |
| 14 |
watch(%r{(?:.+/)?\.rubocop_todo\.yml$}) { |m| File.dirname(m[0]) } |
| 15 |
end |
| 16 |
|
| 17 |
# TODO: guard rspec should have a configurable file for this to work |
| 18 |
# TODO: also split up Rakefile |
| 19 |
guard :rspec, cmd: 'bundle exec rspec -t acceptance', failed_mode: :keep, all_after_pass: true do |
| 20 |
watch(%r{^spec/lib/.+_spec\.rb$}) |
| 21 |
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } |
| 22 |
watch(%r{^spec/support/*}) { 'spec' } |
| 23 |
watch('spec/spec_helper.rb') { 'spec' } |
| 24 |
watch(%r{^spec/acceptance/.+_spec\.rb$}) |
| 25 |
end |
| 26 |
end |