Skip to content
This repository
Browse code

add info about available formatters to command line help

  • Loading branch information...
commit 86413c8e3670e5cc1398e130636eb2cdc7e7b5e0 1 parent 8e213d5
David Chelimsky dchelimsky authored
4 lib/rspec/core/command_line_options.rb
@@ -26,7 +26,9 @@ def parse
26 26 options[:color_enabled] = o
27 27 end
28 28
29   - opts.on('-f', '--formatter [FORMATTER]', 'Choose an optional formatter') do |o|
  29 + opts.on('-f', '--formatter [FORMATTER]', 'Choose a formatter',
  30 + ' [p]rogress (default - dots)',
  31 + ' [d]ocumentation (group and example names)') do |o|
30 32 options[:formatter] = o
31 33 end
32 34
6 lib/rspec/core/configuration.rb
@@ -54,9 +54,7 @@ def mock_framework=(use_me_to_mock)
54 54
55 55 def require_mock_framework_adapter
56 56 require case @options[:mock_framework].to_s
57   - when ""
58   - 'rspec/core/mocking/with_rspec'
59   - when /rspec/i
  57 + when "", /rspec/i
60 58 'rspec/core/mocking/with_rspec'
61 59 when /mocha/i
62 60 'rspec/core/mocking/with_mocha'
@@ -130,7 +128,7 @@ def formatter_class
130 128
131 129 def formatter=(formatter_to_use)
132 130 formatter_class = case formatter_to_use.to_s
133   - when /doc/, 's', 'n'
  131 + when 'd', 'doc', 'documentation', 's', 'n', 'spec', 'nested'
134 132 Rspec::Core::Formatters::DocumentationFormatter
135 133 when 'progress'
136 134 Rspec::Core::Formatters::ProgressFormatter

0 comments on commit 86413c8

Please sign in to comment.
Something went wrong with that request. Please try again.