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 very end,
close
allows the formatter to clean up resources, e.g. -
- (void) dump_failures
Dumps detailed information about each example failure.
-
- (void) dump_summary
This method is invoked after the dumping of examples and failures.
-
- (void) message
Used by the reporter to send messages to the output stream.
Methods inherited from BaseFormatter
#dump_profile, #example_failed, #example_group_finished, #example_group_started, #example_passed, #example_pending, #example_started, #initialize, #start, #start_dump, #stop
Constructor Details
This class inherits a constructor from RSpec::Core::Formatters::BaseFormatter
Instance Method Details
- (void) close(notification)
Invoked at the very end, close
allows the formatter to clean
up resources, e.g. open streams, etc.
68 69 70 71 72 73 |
# File 'lib/rspec/core/formatters/base_text_formatter.rb', line 68 def close(notification) return unless IO === output return if output.closed? || output == $stdout output.close end |
- (void) dump_failures
Dumps detailed information about each example failure.
33 34 35 36 |
# File 'lib/rspec/core/formatters/base_text_formatter.rb', line 33 def dump_failures(notification) return if notification.failure_notifications.empty? output.puts notification.fully_formatted_failed_examples end |
- (void) dump_summary
This method is invoked after the dumping of examples and failures. Each parameter is assigned to a corresponding attribute.
46 47 48 |
# File 'lib/rspec/core/formatters/base_text_formatter.rb', line 46 def dump_summary(summary) output.puts summary.fully_formatted end |
- (void) message
Used by the reporter to send messages to the output stream.
23 24 25 |
# File 'lib/rspec/core/formatters/base_text_formatter.rb', line 23 def (notification) output.puts notification. end |