Created
September 7, 2011 21:48
-
-
Save cball/1201885 to your computer and use it in GitHub Desktop.
Spork & Rspec Guardfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# More info at https://github.com/guard/guard#readme | |
guard 'spork', :cucumber => false, :test_unit => false, :rspec_env => { 'RAILS_ENV' => 'test' } 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', :version => 1, :cli => "--color --format progress --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{^spec/factories/(.+).rb$}) { "spec" } | |
watch(%r{^spec/models/.+.rb$}) { "spec/models" } | |
watch(%r{^spec/routing/.+.rb$}) { "spec/routing" } | |
watch('spec/spec_helper.rb') { "spec" } | |
watch('config/routes.rb') { "spec/routing" } | |
watch('app/controllers/application_controller.rb') { "spec/controllers" } | |
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment