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

Inherits:
ExampleNotification show all
Defined in:
lib/rspec/core/notifications.rb

Overview

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

See Also:

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (RSpec::Core::Example) example

the current example

Returns:



222
223
224
# File 'lib/rspec/core/notifications.rb', line 222

def example
  @example
end

Instance Method Details

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

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

Returns:

  • (String)

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



227
228
229
230
231
232
# File 'lib/rspec/core/notifications.rb', line 227

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)
end