Skip to content

Commit

Permalink
[core] Rename option for FailureList formatter to "failures"
Browse files Browse the repository at this point in the history
The name was not matching case statement in formatters.rb and it is much
simplier to have an argument with that name.

Discussion:
  - https://github.com/rspec/rspec-core/pull/2624/files#r284776400

---
This commit was imported from rspec/rspec-core@63179c7.
  • Loading branch information
benoittgt committed May 16, 2019
1 parent 5103e97 commit 38ce60d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rspec-core/lib/rspec/core/formatters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def built_in_formatter(key)
JsonFormatter
when 'bisect-drb'
BisectDRbFormatter
when 'f', 'failure_list'
when 'f', 'failures'
FailureListFormatter
end
end
Expand Down
2 changes: 1 addition & 1 deletion rspec-core/lib/rspec/core/option_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def parser(options)
' [d]ocumentation (group and example names)',
' [h]tml',
' [j]son',
' [f]ailure list (suitable for editors integration)',
' [f]ailures ("file:line:reason", suitable for editors integration)',
' custom formatter class name') do |o|
options[:formatters] ||= []
options[:formatters] << [o]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module RSpec::Core::Formatters
include FormatterSupport

it 'produces the expected full output' do
output = run_example_specs_with_formatter('failure_list')
output = run_example_specs_with_formatter('failures')
expect(output).to eq(<<-EOS.gsub(/^\s+\|/, ''))
|./spec/rspec/core/resources/formatter_specs.rb:4:is marked as pending but passes
|./spec/rspec/core/resources/formatter_specs.rb:36:fails
Expand Down

0 comments on commit 38ce60d

Please sign in to comment.