Class: RSpec::Core::Formatters::BaseFormatter
- Inherits:
-
Object
- Object
- RSpec::Core::Formatters::BaseFormatter
- Defined in:
- lib/rspec/core/formatters/base_formatter.rb
Overview
RSpec's built-in formatters are all subclasses of RSpec::Core::Formatters::BaseTextFormatter.
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- (void) example_group
Returns the value of attribute example_group.
-
- (void) output
readonly
Returns the value of attribute output.
Instance Method Summary (collapse)
- - (void) close(_notification)
- - (void) example_group_started(notification)
-
- (BaseFormatter) initialize(output)
constructor
A new instance of BaseFormatter.
- - (void) start(notification)
Constructor Details
- (BaseFormatter) initialize(output)
Returns a new instance of BaseFormatter
21 22 23 24 |
# File 'lib/rspec/core/formatters/base_formatter.rb', line 21 def initialize(output) @output = output || StringIO.new @example_group = nil end |
Instance Attribute Details
- (void) example_group
Returns the value of attribute example_group
15 16 17 |
# File 'lib/rspec/core/formatters/base_formatter.rb', line 15 def example_group @example_group end |
- (void) output (readonly)
Returns the value of attribute output
16 17 18 |
# File 'lib/rspec/core/formatters/base_formatter.rb', line 16 def output @output end |
Instance Method Details
- (void) close(_notification)
47 48 49 |
# File 'lib/rspec/core/formatters/base_formatter.rb', line 47 def close(_notification) restore_sync_output end |
- (void) example_group_started(notification)
39 40 41 |
# File 'lib/rspec/core/formatters/base_formatter.rb', line 39 def example_group_started(notification) @example_group = notification.group end |
- (void) start(notification)
30 31 32 33 |
# File 'lib/rspec/core/formatters/base_formatter.rb', line 30 def start(notification) start_sync_output @example_count = notification.count end |