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

Add --coverage_html support to cli #109

Merged
merged 2 commits into from
Feb 4, 2013
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
14 changes: 13 additions & 1 deletion lib/guard/jasmine/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ class CLI < Thor
:type => :boolean,
:default => false,
:desc => 'Whether to enable the coverage support or not'

method_option :coverage_html,
:type => :boolean,
:default => false,
:desc => 'Whether to generate html coverage report. Implies --coverage'

method_option :coverage_summary,
:type => :boolean,
:default => false,
:desc => 'Whether to generate html coverage summary. Implies --coverage'

method_option :statements_threshold,
:type => :numeric,
Expand Down Expand Up @@ -139,7 +149,9 @@ def spec(*paths)
runner_options[:errors] = [:always, :never, :failure].include?(options.errors.to_sym) ? options.errors.to_sym : :failure
runner_options[:specdoc] = [:always, :never, :failure].include?(options.specdoc.to_sym) ? options.specdoc.to_sym : :always
runner_options[:focus] = options.focus
runner_options[:coverage] = options.coverage
runner_options[:coverage] = options.coverage || options.coverage_html || options.coverage_summary
runner_options[:coverage_html] = options.coverage_html
runner_options[:coverage_summary] = options.coverage_summary
runner_options[:statements_threshold] = options.statements_threshold
runner_options[:functions_threshold] = options.functions_threshold
runner_options[:branches_threshold] = options.branches_threshold
Expand Down