From a4acf9e78302d68b9ef0ba1011e1a9e406f8e996 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 24 Aug 2011 10:16:00 -0400 Subject: [PATCH] update Guardfile template --- README.md | 1 - lib/guard/hydra/templates/Guardfile | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e431264..94be9e8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ Use Guard with Hydra and get super-parallel test execution! Awesome! - Options: * `:runner_log`: The location of the runner log where output is printed diff --git a/lib/guard/hydra/templates/Guardfile b/lib/guard/hydra/templates/Guardfile index 255d427..7c8f127 100644 --- a/lib/guard/hydra/templates/Guardfile +++ b/lib/guard/hydra/templates/Guardfile @@ -1,4 +1,10 @@ guard 'hydra' do # All spec files - watch(%r{spec/**/*_spec.rb}) + watch(%r{^spec/**/*_spec.rb$}) + + # All lib files + watch(%r{^lib/(.*)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } + + # All app files for a Rails app + watch(%r{^app/(.*)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } end