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

Inherits:
Struct
  • Object
show all
Defined in:
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

Instance Attribute Summary (collapse)

Instance Attribute Details

- (RSpec::Core::Example) example

the current example



34
35
36
# File 'lib/rspec/core/notifications.rb', line 34

def example
  @example
end