2013-02-03 20:02:53 +01:00
|
|
|
def rspec_guard(options = {}, &block)
|
|
|
|
options = {
|
2017-05-08 17:28:07 +03:00
|
|
|
version: 2,
|
|
|
|
notification: false
|
2013-02-03 20:02:53 +01:00
|
|
|
}.merge(options)
|
|
|
|
|
|
|
|
guard 'rspec', options, &block
|
|
|
|
end
|
|
|
|
|
2017-05-08 17:28:07 +03:00
|
|
|
rspec_guard spec_paths: %w{spec/draper spec/generators} do
|
2013-02-03 20:02:53 +01:00
|
|
|
watch(%r{^spec/.+_spec\.rb$})
|
|
|
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
|
|
watch('spec/spec_helper.rb') { "spec" }
|
|
|
|
end
|
|
|
|
|
2017-05-08 17:28:07 +03:00
|
|
|
rspec_guard spec_paths: 'spec/integration', env: {'RAILS_ENV' => 'development'} do
|
2013-02-03 20:02:53 +01:00
|
|
|
watch(%r{^spec/.+_spec\.rb$})
|
|
|
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
|
|
watch('spec/spec_helper.rb') { "spec" }
|
|
|
|
end
|
|
|
|
|
2017-05-08 17:28:07 +03:00
|
|
|
rspec_guard spec_paths: 'spec/integration', env: {'RAILS_ENV' => 'production'} do
|
2011-06-30 18:19:48 -04:00
|
|
|
watch(%r{^spec/.+_spec\.rb$})
|
2011-10-16 11:15:04 -04:00
|
|
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
2011-06-30 18:19:48 -04:00
|
|
|
watch('spec/spec_helper.rb') { "spec" }
|
|
|
|
end
|