Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 86413c8

Browse files
committed
add info about available formatters to command line help
1 parent 8e213d5 commit 86413c8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/rspec/core/command_line_options.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def parse
2626
options[:color_enabled] = o
2727
end
2828

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|
3032
options[:formatter] = o
3133
end
3234

lib/rspec/core/configuration.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ def mock_framework=(use_me_to_mock)
5454

5555
def require_mock_framework_adapter
5656
require case @options[:mock_framework].to_s
57-
when ""
58-
'rspec/core/mocking/with_rspec'
59-
when /rspec/i
57+
when "", /rspec/i
6058
'rspec/core/mocking/with_rspec'
6159
when /mocha/i
6260
'rspec/core/mocking/with_mocha'
@@ -130,7 +128,7 @@ def formatter_class
130128

131129
def formatter=(formatter_to_use)
132130
formatter_class = case formatter_to_use.to_s
133-
when /doc/, 's', 'n'
131+
when 'd', 'doc', 'documentation', 's', 'n', 'spec', 'nested'
134132
Rspec::Core::Formatters::DocumentationFormatter
135133
when 'progress'
136134
Rspec::Core::Formatters::ProgressFormatter

0 commit comments

Comments
 (0)