1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00
draper/Guardfile
Morgan Lieberthal 406f96204b Gemfile and Guardfile Edits
Add pry, guard to development group, update Guardfile for new guard-rspec syntax.
2015-08-27 01:08:59 -06:00

29 lines
867 B
Ruby

notification :gntp, host: '127.0.0.1'
def rspec_guard(options = {}, &block)
opts = {
:cmd => 'rspec'
}.merge(options)
guard 'rspec', opts, &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'], cmd: 'RAILS_ENV=development rspec' 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'], cmd: 'RAILS_ENV=production rspec' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end
# vim: set ts=8 sw=2 tw=0 ft=ruby et :