Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added clean option to be able to use different naming conventions #40

Merged
merged 1 commit into from
Feb 29, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/guard/jasmine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down