Created
October 31, 2012 21:24
-
-
Save alanmaciel/3989960 to your computer and use it in GitHub Desktop.
Additions to the default 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
require 'active_support/core_ext' | |
# Ensures that Guard doesn’t run all the tests after a failing test passes | |
# (to speed up the Red- Green-Refactor cycle): | |
guard 'rspec', :version => 2, :all_after_pass => false do | |
. | |
. | |
. | |
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) do |m| | |
["spec/routing/#{m[1]}_routing_spec.rb", | |
"spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", | |
"spec/acceptance/#{m[1]}_spec.rb", | |
(m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" : | |
"spec/requests/#{m[1].singularize}_pages_spec.rb")] | |
end | |
watch(%r{^app/views/(.+)/}) do |m| | |
(m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" : | |
"spec/requests/#{m[1].singularize}_pages_spec.rb") | |
end | |
. | |
. | |
. | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment