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

#exampleRSpec::Core::Example

the current example

Returns:



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

def example
  @example
end