forked from drapergem/draper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Guardfile
26 lines (22 loc) · 823 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
def rspec_guard(options = {}, &block)
options = {
:version => 2,
:notification => false
}.merge(options)
guard 'rspec', options, &block
end
rspec_guard :spec_paths => %w{spec/draper spec/generators} do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end
rspec_guard :spec_paths => 'spec/integration', :env => {'RAILS_ENV' => 'development'} do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end
rspec_guard :spec_paths => 'spec/integration', :env => {'RAILS_ENV' => 'production'} do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end