Skip to content

Instantly share code, notes, and snippets.

@vinibaggio
Created June 20, 2011 20:15
Show Gist options
  • Save vinibaggio/1036468 to your computer and use it in GitHub Desktop.
Save vinibaggio/1036468 to your computer and use it in GitHub Desktop.
Guardfile
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' }, :cucumber => false do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('spec/spec_helper.rb')
end
guard 'rspec', :cli => '--drb' do
watch(%r{^spec/.+_spec\.rb})
watch(%r{^app/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb}) { |m| "spec/requests/#{m[1]}_spec.rb" }
watch(%r{^app/views/(.+)/.*\.erb}) { |m| "spec/requests/#{m[1]}_spec.rb" }
end
@vinibaggio
Copy link
Author

caveats: fixtures will blow up. Hard.

@plentz
Copy link

plentz commented Aug 18, 2011

agora que vi meu nome aqui =~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment