From 6aa27e2b197819576ea2f139fcde374537370ba4 Mon Sep 17 00:00:00 2001 From: Ryan Fitzgerald Date: Sat, 8 Sep 2012 20:44:25 -0700 Subject: [PATCH] Skip the full suite if the specific test file fails --- Guardfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Guardfile b/Guardfile index 3d90a79a..14084a10 100644 --- a/Guardfile +++ b/Guardfile @@ -10,7 +10,12 @@ module ::Guard def run_spec(path) if File.exists?(path) - system "bundle exec bacon -Itest -q #{path}" + success = system "bundle exec bacon -Itest -q #{path}" + + if !success + @any_failed = true + end + puts end end @@ -20,13 +25,16 @@ module ::Guard end def run_on_changes(paths) + @any_failed = false paths.delete(:all) paths.each do |path| file_changed(path) end - run_all + if !@any_failed + run_all + end end end end