Skip to content

Instantly share code, notes, and snippets.

@espen
Created July 4, 2012 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save espen/d70ed0e5db9369133a48 to your computer and use it in GitHub Desktop.
Save espen/d70ed0e5db9369133a48 to your computer and use it in GitHub Desktop.
guard file
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'test' do
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^test/.+_test\.rb$})
watch('test/test_helper.rb') { "test" }
# Rails example
watch(%r{^app/models/(.+)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
watch(%r{^app/controllers/(.+)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
watch(%r{^app/views/.+\.rb$}) { "test/integration" }
watch('app/controllers/application_controller.rb') { ["test/functional", "test/integration"] }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment