Sha256: 9bb93545618a822427127eab6762a418de96acba3a12d8d67ecfa864ce05d3c0

Contents?: true

Size: 348 Bytes

Versions: 4

Compression:

Stored size: 348 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

RSpec.describe FiniteMachine::HookEvent, '.notify' do
  it "emits event on the subscriber" do
    subscriber = spy(:subscriber)
    hook_event = described_class.new(:green, :go, :red)

    hook_event.notify(subscriber, 1, 2)

    expect(subscriber).to have_received(:emit).with(hook_event, 1, 2)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
finite_machine-0.11.3 spec/unit/hook_event/notify_spec.rb
finite_machine-0.11.2 spec/unit/hook_event/notify_spec.rb
finite_machine-0.11.1 spec/unit/hook_event/notify_spec.rb
finite_machine-0.11.0 spec/unit/hook_event/notify_spec.rb