From 3b2d9e5b0acd0cde1c572d4f9c562fb49e94098d Mon Sep 17 00:00:00 2001 From: Anders Janmyr Date: Wed, 29 Feb 2012 13:09:24 +0100 Subject: [PATCH] Added clean option to be able to use different naming conventions --- lib/guard/jasmine.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/guard/jasmine.rb b/lib/guard/jasmine.rb index c3f2832..ea6d154 100644 --- a/lib/guard/jasmine.rb +++ b/lib/guard/jasmine.rb @@ -30,6 +30,7 @@ class Jasmine < Guard :hide_success => false, :all_on_start => true, :keep_failed => true, + :clean => true, :all_after_pass => true, :max_error_notify => 3, :specdoc => :failure, @@ -52,6 +53,7 @@ class Jasmine < Guard # @option options [Integer] :max_error_notify maximum error notifications to show # @option options [Boolean] :all_on_start run all suites on start # @option options [Boolean] :keep_failed keep failed suites and add them to the next run again + # @option options [Boolean] :clean clean the specs according to rails naming conventions # @option options [Boolean] :all_after_pass run all suites after a suite has passed again after failing # @option options [Symbol] :specdoc options for the specdoc output, either :always, :never or :failure # @option options [Symbol] :console options for the console.log output, either :always, :never or :failure @@ -123,7 +125,8 @@ def run_all # @raise [:task_has_failed] when run_on_change has failed # def run_on_change(paths) - specs = Inspector.clean(options[:keep_failed] ? paths + self.last_failed_paths : paths) + specs = options[:keep_failed] ? paths + self.last_failed_paths : paths + specs = Inspector.clean(specs) if options[:clean] return false if specs.empty? passed, failed_specs = Runner.run(specs, options)