Permalink
Browse files

add info about available formatters to command line help

  • Loading branch information...
1 parent 8e213d5 commit 86413c8e3670e5cc1398e130636eb2cdc7e7b5e0 @dchelimsky dchelimsky committed Mar 21, 2010
Showing with 5 additions and 5 deletions.
  1. +3 −1 lib/rspec/core/command_line_options.rb
  2. +2 −4 lib/rspec/core/configuration.rb
View
4 lib/rspec/core/command_line_options.rb
@@ -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
View
6 lib/rspec/core/configuration.rb
@@ -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'
@@ -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

0 comments on commit 86413c8

Please sign in to comment.