Sha256: 707d78199a1997813afa59493807264d5e444f75ea1339a21bda79c756d7849b

Contents?: true

Size: 647 Bytes

Versions: 14

Compression:

Stored size: 647 Bytes

Contents

require_relative '../../test_helper'

class MachineCollectionTransitionsWithBlankEventsTest < StateMachinesTest
  def setup
    @klass = Class.new

    @machines = StateMachines::MachineCollection.new
    @machines[:state] = @machine = StateMachines::Machine.new(@klass, :state, initial: :parked, action: :save)
    @machine.event :ignite do
      transition parked: :idling
    end

    @object = @klass.new
    @object.state_event = ''
    @transitions = @machines.transitions(@object, :save)
  end

  def test_should_be_empty
    assert @transitions.empty?
  end

  def test_should_perform
    assert_equal true, @transitions.perform
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
state_machines-0.5.0 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/state_machines-0.2.2/test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/state_machines-0.2.2/test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/state_machines-0.2.2/test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.4.0 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.3.0 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.2.2 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.2.1 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.2.0 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.1.4 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.1.3 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.1.2 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.1.1 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb
state_machines-0.1.0 test/unit/machine_collection/machine_collection_transitions_with_blank_events_test.rb