Class: RSpec::Core::Notifications::FailedExampleNotification
- Inherits:
-
ExampleNotification
- Object
- Struct
- ExampleNotification
- RSpec::Core::Notifications::FailedExampleNotification
- Defined in:
- lib/rspec/core/notifications.rb
Overview
The FailedExampleNotification
extends ExampleNotification
with
things useful for examples that have failure info -- typically a
failed or pending spec.
Direct Known Subclasses
PendingExampleFailedAsExpectedNotification, PendingExampleFixedNotification
Instance Attribute Summary (collapse)
-
- (RSpec::Core::Example) example
the current example.
Instance Method Summary (collapse)
-
- (Array<String>) colorized_formatted_backtrace(colorizer = ::RSpec::Core::Formatters::ConsoleCodes)
Returns the failures colorized formatted backtrace.
-
- (Array<String>) colorized_message_lines(colorizer = ::RSpec::Core::Formatters::ConsoleCodes)
Returns the message generated for this failure colorized line by line.
-
- (String) description
The example description.
-
- (Exception) exception
The example failure.
-
- (Array<String>) formatted_backtrace
Returns the failures formatted backtrace.
-
- (String) fully_formatted(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes)
The failure information fully formatted in the way that RSpec's built-in formatters emit.
-
- (Array<string>) fully_formatted_lines(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes)
The failure information fully formatted in the way that RSpec's built-in formatters emit, split by line.
-
- (Array<String>) message_lines
Returns the message generated for this failure line by line.
Instance Attribute Details
- (RSpec::Core::Example) example
the current example
154 155 156 |
# File 'lib/rspec/core/notifications.rb', line 154 def example @example end |
Instance Method Details
- (Array<String>) colorized_formatted_backtrace(colorizer = ::RSpec::Core::Formatters::ConsoleCodes)
Returns the failures colorized formatted backtrace.
193 194 195 |
# File 'lib/rspec/core/notifications.rb', line 193 def colorized_formatted_backtrace(colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.colorized_formatted_backtrace(colorizer) end |
- (Array<String>) colorized_message_lines(colorizer = ::RSpec::Core::Formatters::ConsoleCodes)
Returns the message generated for this failure colorized line by line.
178 179 180 |
# File 'lib/rspec/core/notifications.rb', line 178 def (colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.(colorizer) end |
- (String) description
Returns The example description
163 164 165 |
# File 'lib/rspec/core/notifications.rb', line 163 def description @exception_presenter.description end |
- (Exception) exception
Returns The example failure
158 159 160 |
# File 'lib/rspec/core/notifications.rb', line 158 def exception @exception_presenter.exception end |
- (Array<String>) formatted_backtrace
Returns the failures formatted backtrace.
185 186 187 |
# File 'lib/rspec/core/notifications.rb', line 185 def formatted_backtrace @exception_presenter.formatted_backtrace end |
- (String) fully_formatted(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes)
Returns The failure information fully formatted in the way that RSpec's built-in formatters emit.
199 200 201 |
# File 'lib/rspec/core/notifications.rb', line 199 def fully_formatted(failure_number, colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.fully_formatted(failure_number, colorizer) end |
- (Array<string>) fully_formatted_lines(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes)
Returns The failure information fully formatted in the way that RSpec's built-in formatters emit, split by line.
205 206 207 |
# File 'lib/rspec/core/notifications.rb', line 205 def fully_formatted_lines(failure_number, colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.fully_formatted_lines(failure_number, colorizer) end |
- (Array<String>) message_lines
Returns the message generated for this failure line by line.
170 171 172 |
# File 'lib/rspec/core/notifications.rb', line 170 def @exception_presenter. end |