scube-server/Guardfile
2014-04-01 10:48:18 +00:00

30 lines
1005 B
Ruby

guard 'spork', rspec_env: { RAILS_ENV: 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch('config/routes.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('spec/spec_helper.rb')
watch(%r{^spec/support/.+\.rb$})
end
guard 'rspec', cmd: 'bundle exec rspec --drb -f doc' do
watch(%r{^spec/.+_spec\.rb$})
watch('spec/spec_helper.rb') { 'spec' }
watch(%r{^spec/support/.+\.rb$}) { 'spec' }
watch('spec/factories.rb') { 'spec' }
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.+)\.haml$}) { |m| "spec/#{m[1]}.haml_spec.rb" }
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('app/controllers/application_controller.rb') { 'spec/controllers' }
watch(%r{^app/views/layouts/}) { 'spec/integration' }
watch(%r{^app/views/(.+)/(?:[^/]+).rabl}) do |m|
"spec/controllers/#{m[1]}_controller_spec.rb"
end
end