Class: RSpec::Core::Formatters::BaseTextFormatter
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
RSpec::Core::Formatters::BisectDebugFormatter, RSpec::Core::Formatters::BisectProgressFormatter, RSpec::Core::Formatters::DocumentationFormatter, RSpec::Core::Formatters::ProgressFormatter
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
BaseFormatter
|
|
Instance Chain:
self,
BaseFormatter
|
|
Inherits: |
RSpec::Core::Formatters::BaseFormatter
|
Defined in: | rspec-core/lib/rspec/core/formatters/base_text_formatter.rb |
Overview
Base for all of RSpec’s built-in formatters. See RSpec::Core::Formatters::BaseFormatter to learn more about all of the methods called by the reporter.
Class Method Summary
BaseFormatter
- Inherited
Instance Attribute Summary
BaseFormatter
- Inherited
Instance Method Summary
-
#close(_notification)
Invoked at the end of a suite run.
-
#dump_failures(notification)
Dumps detailed information about each example failure.
- #dump_pending(notification) Internal use only Internal use only
-
#dump_summary(summary)
This method is invoked after the dumping of examples and failures.
-
#message(notification)
Used by the reporter to send messages to the output stream.
- #seed(notification) Internal use only Internal use only
BaseFormatter
- Inherited
Constructor Details
This class inherits a constructor from RSpec::Core::Formatters::BaseFormatter
Instance Method Details
#close(_notification)
Invoked at the end of a suite run. Allows the formatter to do any tidying up, but be aware that formatter output streams may be used elsewhere so don’t actually close them.
# File 'rspec-core/lib/rspec/core/formatters/base_text_formatter.rb', line 65
def close(_notification) return if output.closed? output.puts output.flush end
#dump_failures(notification)
Dumps detailed information about each example failure.
# File 'rspec-core/lib/rspec/core/formatters/base_text_formatter.rb', line 30
def dump_failures(notification) return if notification.failure_notifications.empty? output.puts notification.fully_formatted_failed_examples end
#dump_pending(notification)
# File 'rspec-core/lib/rspec/core/formatters/base_text_formatter.rb', line 47
def dump_pending(notification) return if notification.pending_examples.empty? output.puts notification.fully_formatted_pending_examples end
#dump_summary(summary)
This method is invoked after the dumping of examples and failures. Each parameter is assigned to a corresponding attribute.
# File 'rspec-core/lib/rspec/core/formatters/base_text_formatter.rb', line 42
def dump_summary(summary) output.puts summary.fully_formatted end
#message(notification)
Used by the reporter to send messages to the output stream.
# File 'rspec-core/lib/rspec/core/formatters/base_text_formatter.rb', line 21
def (notification) output.puts notification. end
#seed(notification)
# File 'rspec-core/lib/rspec/core/formatters/base_text_formatter.rb', line 53
def seed(notification) return unless notification.seed_used? output.puts notification.fully_formatted end