Skip to content

Commit

Permalink
[core] Rename minimal formatter to failure list formatter (rspec/rspe…
Browse files Browse the repository at this point in the history
  • Loading branch information
benoittgt authored and JonRowe committed May 16, 2019
1 parent f74f6f6 commit 5103e97
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions rspec-core/lib/rspec/core/formatters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module RSpec::Core::Formatters
autoload :JsonFormatter, 'rspec/core/formatters/json_formatter'
autoload :BisectDRbFormatter, 'rspec/core/formatters/bisect_drb_formatter'
autoload :ExceptionPresenter, 'rspec/core/formatters/exception_presenter'
autoload :MinimalFormatter, 'rspec/core/formatters/minimal_formatter'
autoload :FailureListFormatter, 'rspec/core/formatters/failure_list_formatter'

# Register the formatter class
# @param formatter_class [Class] formatter class to register
Expand Down Expand Up @@ -213,8 +213,8 @@ def built_in_formatter(key)
JsonFormatter
when 'bisect-drb'
BisectDRbFormatter
when 'm', 'minimal'
MinimalFormatter
when 'f', 'failure_list'
FailureListFormatter
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RSpec
module Core
module Formatters
# @private
class MinimalFormatter < BaseFormatter
class FailureListFormatter < BaseFormatter
Formatters.register self, :example_failed, :dump_profile, :message

def example_failed(failure)
Expand All @@ -13,8 +13,8 @@ def example_failed(failure)

# Discard profile and messages
#
# These outputs are not really relevant in the context of this minimal
# formatter.
# These outputs are not really relevant in the context of this failure
# list formatter.
def dump_profile(_profile); end
def message(_message); 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',
' [m]inimal (suitable for editors integration)',
' [f]ailure list (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
@@ -1,11 +1,11 @@
require 'rspec/core/formatters/minimal_formatter'
require 'rspec/core/formatters/failure_list_formatter'

module RSpec::Core::Formatters
RSpec.describe MinimalFormatter do
RSpec.describe FailureListFormatter do
include FormatterSupport

it 'produces the expected full output' do
output = run_example_specs_with_formatter('minimal')
output = run_example_specs_with_formatter('failure_list')
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 5103e97

Please sign in to comment.