-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGuardfile
28 lines (25 loc) · 837 Bytes
/
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
27
28
# frozen_string_literal: true
group :rails do
guard :process, name: 'Rails', dir: 'sandbox', command: 'bundle exec rails server' do
watch('sandbox/Gemfile.lock')
watch(%r{^sandbox/lib/(.+)\.rb$})
watch(%r{^sandbox/app/(.+)\.rb$})
watch(%r{^sandbox/config/(.+)\.rb$})
watch(%r{^lib/(.+)\.rb$})
watch(/.*\.gemspec/)
end
end
group :rspec do
guard :process, name: 'RSpec', command: 'bundle exec rake spec' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
end
end
group :e2e do
guard :process, name: 'capybara', command: 'bundle exec rake e2e' do
watch(%r{^spec/e2e/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/e2e/spec_helper.rb') { 'spec' }
end
end