1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00
draper/Guardfile
Dmytro Stepaniuk f441d11dcd Replace hash rockets with new syntax (#802)
* update rocket hash syntax in Guardfile

* update rocket hash syntax in spec/dummy/lib/tasks/test.rake

* update rocket hash syntax in lib/draper/tasks/test.rake

* update rocket hash syntax in lib/generators/mini_test/decorator_generator.rb

* update rocket hash syntax in schema from dummy app
2017-05-08 09:28:07 -05:00

26 lines
802 B
Ruby

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