Skip to content

Instantly share code, notes, and snippets.

@rymai
Created December 13, 2010 22:57
Show Gist options
  • Save rymai/739757 to your computer and use it in GitHub Desktop.
Save rymai/739757 to your computer and use it in GitHub Desktop.
When a controller file is modified, it will execute the associated: - routing spec, - controller spec, - acceptance spec
# When a controller file is modified, it will execute the associated:
# - routing spec,
# - controller spec,
# - acceptance spec
guard 'rspec' do
watch(%r|app/controllers/(.*)_controller\.rb|) do |m|
["spec/routing/#{m[1]}_routing_spec.rb",
"spec/controllers/#{m[1]}_controller_spec.rb",
"spec/acceptance/#{m[1]}_spec.rb"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment