Skip to content

Commit

Permalink
add info about available formatters to command line help
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Mar 21, 2010
1 parent 8e213d5 commit 86413c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion lib/rspec/core/command_line_options.rb
Expand Up @@ -26,7 +26,9 @@ def parse
options[:color_enabled] = o
end

opts.on('-f', '--formatter [FORMATTER]', 'Choose an optional formatter') do |o|
opts.on('-f', '--formatter [FORMATTER]', 'Choose a formatter',
' [p]rogress (default - dots)',
' [d]ocumentation (group and example names)') do |o|
options[:formatter] = o
end

Expand Down
6 changes: 2 additions & 4 deletions lib/rspec/core/configuration.rb
Expand Up @@ -54,9 +54,7 @@ def mock_framework=(use_me_to_mock)

def require_mock_framework_adapter
require case @options[:mock_framework].to_s
when ""
'rspec/core/mocking/with_rspec'
when /rspec/i
when "", /rspec/i
'rspec/core/mocking/with_rspec'
when /mocha/i
'rspec/core/mocking/with_mocha'
Expand Down Expand Up @@ -130,7 +128,7 @@ def formatter_class

def formatter=(formatter_to_use)
formatter_class = case formatter_to_use.to_s
when /doc/, 's', 'n'
when 'd', 'doc', 'documentation', 's', 'n', 'spec', 'nested'
Rspec::Core::Formatters::DocumentationFormatter
when 'progress'
Rspec::Core::Formatters::ProgressFormatter
Expand Down

0 comments on commit 86413c8

Please sign in to comment.