Sha256: 8bf5585d524364d0cb641caa77a8eefed06d4e67dfd3ee7e325769365dc6a09c

Contents?: true

Size: 401 Bytes

Versions: 4

Compression:

Stored size: 401 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

RSpec.describe FiniteMachine::HookEvent, '#build' do
  it "builds action event" do
    hook_event = FiniteMachine::HookEvent::Before.build(:green, :go, :red)
    expect(hook_event.name).to eq(:go)
  end

  it "builds state event" do
    hook_event = FiniteMachine::HookEvent::Enter.build(:green, :go, :red)
    expect(hook_event.name).to eq(:green)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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