class Stenotype::Test::Matchers::EventEmitted

Attributes

expected_event_name[R]
matching_events[R]

Public Class Methods

new(matching_events, expected_event_name) click to toggle source
# File lib/stenotype/test/matchers.rb, line 66
def initialize(matching_events, expected_event_name)
  @matching_events = matching_events
  @expected_event_name = expected_event_name
end

Public Instance Methods

failure_message() click to toggle source
# File lib/stenotype/test/matchers.rb, line 75
def failure_message
  "expected to see a '#{expected_event_name}' event but got nothing"
end
matches?() click to toggle source
# File lib/stenotype/test/matchers.rb, line 71
def matches?
  matching_events.any?
end