123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Core::Notifications::SkippedExampleNotification

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ExampleNotification, Struct
Instance Chain:
self, ExampleNotification, Struct
Inherits: RSpec::Core::Notifications::ExampleNotification
Defined in: rspec-core/lib/rspec/core/notifications.rb

Overview

The ‘SkippedExampleNotification` extends ExampleNotification with things useful for specs that are skipped.

Class Method Summary

Instance Attribute Summary

ExampleNotification - Inherited

#example

The ‘ExampleNotification` represents notifications sent by the reporter which contain information about the current (or soon to be) example.

Instance Method Summary

Instance Attribute Details

#example (rw)

The ‘SkippedExampleNotification` extends ExampleNotification with things useful for specs that are skipped.

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/notifications.rb', line 230

class SkippedExampleNotification < ExampleNotification
public_class_method :new

# @return [String] The pending detail fully formatted in the way that
#   RSpec's built-in formatters emit.
def fully_formatted(pending_number, colorizer=::RSpec::Core::Formatters::ConsoleCodes)

Instance Method Details

#fully_formatted(pending_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ String

Returns:

  • (String)

    The pending detail fully formatted in the way that RSpec’s built-in formatters emit.

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/notifications.rb', line 235

def fully_formatted(pending_number, colorizer=::RSpec::Core::Formatters::ConsoleCodes)
  formatted_caller = RSpec.configuration.backtrace_formatter.backtrace_line(example.location)

  [
    colorizer.wrap("\n  #{pending_number}) #{example.full_description}", :pending),
    "\n     ",
    Formatters::ExceptionPresenter::PENDING_DETAIL_FORMATTER.call(example, colorizer),
    "\n",
    colorizer.wrap("     # #{formatted_caller}\n", :detail)
  ].join("")
end