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

Commit 4b92e78

Browse files
benoittgtJonRowe
authored andcommitted
Rename minimal formatter to failure list formatter (#2624)
Related: https://github.com/rspec/rspec-core/pull/2614/files#r284276797
1 parent b5b0967 commit 4b92e78

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

lib/rspec/core/formatters.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module RSpec::Core::Formatters
7474
autoload :JsonFormatter, 'rspec/core/formatters/json_formatter'
7575
autoload :BisectDRbFormatter, 'rspec/core/formatters/bisect_drb_formatter'
7676
autoload :ExceptionPresenter, 'rspec/core/formatters/exception_presenter'
77-
autoload :MinimalFormatter, 'rspec/core/formatters/minimal_formatter'
77+
autoload :FailureListFormatter, 'rspec/core/formatters/failure_list_formatter'
7878

7979
# Register the formatter class
8080
# @param formatter_class [Class] formatter class to register
@@ -213,8 +213,8 @@ def built_in_formatter(key)
213213
JsonFormatter
214214
when 'bisect-drb'
215215
BisectDRbFormatter
216-
when 'm', 'minimal'
217-
MinimalFormatter
216+
when 'f', 'failure_list'
217+
FailureListFormatter
218218
end
219219
end
220220

lib/rspec/core/formatters/minimal_formatter.rb lib/rspec/core/formatters/failure_list_formatter.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module RSpec
44
module Core
55
module Formatters
66
# @private
7-
class MinimalFormatter < BaseFormatter
7+
class FailureListFormatter < BaseFormatter
88
Formatters.register self, :example_failed, :dump_profile, :message
99

1010
def example_failed(failure)
@@ -13,8 +13,8 @@ def example_failed(failure)
1313

1414
# Discard profile and messages
1515
#
16-
# These outputs are not really relevant in the context of this minimal
17-
# formatter.
16+
# These outputs are not really relevant in the context of this failure
17+
# list formatter.
1818
def dump_profile(_profile); end
1919
def message(_message); end
2020
end

lib/rspec/core/option_parser.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def parser(options)
112112
' [d]ocumentation (group and example names)',
113113
' [h]tml',
114114
' [j]son',
115-
' [m]inimal (suitable for editors integration)',
115+
' [f]ailure list (suitable for editors integration)',
116116
' custom formatter class name') do |o|
117117
options[:formatters] ||= []
118118
options[:formatters] << [o]

spec/rspec/core/formatters/minimal_formatter_spec.rb spec/rspec/core/formatters/failure_list_formatter_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
require 'rspec/core/formatters/minimal_formatter'
1+
require 'rspec/core/formatters/failure_list_formatter'
22

33
module RSpec::Core::Formatters
4-
RSpec.describe MinimalFormatter do
4+
RSpec.describe FailureListFormatter do
55
include FormatterSupport
66

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

0 commit comments

Comments
 (0)