Sha256: 0bc32fc3b9c1dec0a68eb4a2680ed3fddbd711da073f88c29f7fedb2fd3bbd1b

Contents?: true

Size: 420 Bytes

Versions: 8

Compression:

Stored size: 420 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe FiniteMachine::Event, '#<<' do
  let(:machine) { double(:machine) }

  let(:object) { described_class }

  subject(:event) { object.new(machine, name: :test) }

  it "adds multiple transitions" do
    transition = double(:transition)
    event << transition
    event << transition
    expect(event.state_transitions).to match_array([transition, transition])
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
finite_machine-0.10.0 spec/unit/event/add_spec.rb
finite_machine-0.9.2 spec/unit/event/add_spec.rb
finite_machine-0.9.1 spec/unit/event/add_spec.rb
finite_machine-0.9.0 spec/unit/event/add_spec.rb
finite_machine-0.8.1 spec/unit/event/add_spec.rb
finite_machine-0.8.0 spec/unit/event/add_spec.rb
finite_machine-0.7.1 spec/unit/event/add_spec.rb
finite_machine-0.7.0 spec/unit/event/add_spec.rb