Class: RSpec::Core::Formatters::BaseTextFormatter
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- RSpec::Core::Formatters::BaseTextFormatter
- Defined in:
- 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.
Instance Attribute Summary
Attributes inherited from BaseFormatter
Instance Method Summary (collapse)
-
- (void) close(_notification)
Invoked at the end of a suite run.
-
- (void) dump_failures(notification)
Dumps detailed information about each example failure.
-
- (void) dump_summary(summary)
This method is invoked after the dumping of examples and failures.
-
- (void) message(notification)
Used by the reporter to send messages to the output stream.
Methods inherited from BaseFormatter
#example_group_started, #initialize, #start
Constructor Details
This class inherits a constructor from RSpec::Core::Formatters::BaseFormatter
Instance Method Details
- (void) 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.
65 66 67 68 69 70 71 |
# File 'lib/rspec/core/formatters/base_text_formatter.rb', line 65 def close(_notification) return if output.closed? output.puts output.flush end |
- (void) dump_failures(notification)
Dumps detailed information about each example failure.
30 31 32 33 |
# File '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 |
- (void) dump_summary(summary)
This method is invoked after the dumping of examples and failures. Each parameter is assigned to a corresponding attribute.
42 43 44 |
# File 'lib/rspec/core/formatters/base_text_formatter.rb', line 42 def dump_summary(summary) output.puts summary.fully_formatted end |
- (void) message(notification)
Used by the reporter to send messages to the output stream.
21 22 23 |
# File 'lib/rspec/core/formatters/base_text_formatter.rb', line 21 def (notification) output.puts notification. end |