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
-
#example ⇒ RSpec::Core::Example
the current example.
Instance Method Summary collapse
-
#colorized_formatted_backtrace(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ Array<String>
Returns the failures colorized formatted backtrace.
-
#colorized_message_lines(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ Array<String>
Returns the message generated for this failure colorized line by line.
-
#description ⇒ String
The example description.
-
#exception ⇒ Exception
The example failure.
-
#formatted_backtrace ⇒ Array<String>
Returns the failures formatted backtrace.
-
#fully_formatted(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ String
The failure information fully formatted in the way that RSpec's built-in formatters emit.
-
#message_lines ⇒ Array<String>
Returns the message generated for this failure line by line.
Instance Attribute Details
#example ⇒ RSpec::Core::Example
the current example
153 154 155 |
# File 'lib/rspec/core/notifications.rb', line 153 def example @example end |
Instance Method Details
#colorized_formatted_backtrace(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ Array<String>
Returns the failures colorized formatted backtrace.
192 193 194 |
# File 'lib/rspec/core/notifications.rb', line 192 def colorized_formatted_backtrace(colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.colorized_formatted_backtrace(colorizer) end |
#colorized_message_lines(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ Array<String>
Returns the message generated for this failure colorized line by line.
177 178 179 |
# File 'lib/rspec/core/notifications.rb', line 177 def (colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.(colorizer) end |
#description ⇒ String
Returns The example description.
162 163 164 |
# File 'lib/rspec/core/notifications.rb', line 162 def description @exception_presenter.description end |
#exception ⇒ Exception
Returns The example failure.
157 158 159 |
# File 'lib/rspec/core/notifications.rb', line 157 def exception @exception_presenter.exception end |
#formatted_backtrace ⇒ Array<String>
Returns the failures formatted backtrace.
184 185 186 |
# File 'lib/rspec/core/notifications.rb', line 184 def formatted_backtrace @exception_presenter.formatted_backtrace end |
#fully_formatted(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ String
Returns The failure information fully formatted in the way that RSpec's built-in formatters emit.
198 199 200 |
# File 'lib/rspec/core/notifications.rb', line 198 def fully_formatted(failure_number, colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.fully_formatted(failure_number, colorizer) end |
#message_lines ⇒ Array<String>
Returns the message generated for this failure line by line.
169 170 171 |
# File 'lib/rspec/core/notifications.rb', line 169 def @exception_presenter. end |