Class: RSpec::Core::Notifications::ExampleNotification

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec/core/notifications.rb,
lib/rspec/core/notifications.rb

Overview

The ExampleNotification represents notifications sent by the reporter which contain information about the current (or soon to be) example. It is used by formatters to access information about that example.

Examples:

def example_started(notification)
  puts "Hey I started #{notification.example.description}"
end

Direct Known Subclasses

FailedExampleNotification, SkippedExampleNotification

Instance Attribute Summary (collapse)

Instance Attribute Details

- (RSpec::Core::Example) example

the current example

Returns:

37
38
39
# File 'lib/rspec/core/notifications.rb', line 37
def example
  @example
end