Sha256: 01cd9519dfe769ea9ca3c120b4782a975e4f8b76b8f7bf889bb4d653d1c0e459

Contents?: true

Size: 836 Bytes

Versions: 14

Compression:

Stored size: 836 Bytes

Contents

require_relative '../../test_helper'

class TransitionCollectionWithActionHookBaseTest < StateMachinesTest
  def setup
    @superclass = Class.new do
      def save
        true
      end
    end

    @klass = Class.new(@superclass) do
      attr_reader :saved, :state_on_save, :state_event_on_save, :state_event_transition_on_save

      def save
        @saved = true
        @state_on_save = state
        @state_event_on_save = state_event
        @state_event_transition_on_save = state_event_transition
        super
      end
    end

    @machine = StateMachines::Machine.new(@klass, initial: :parked, action: :save)
    @machine.state :idling
    @machine.event :ignite

    @object = @klass.new

    @transition = StateMachines::Transition.new(@object, @machine, :ignite, :parked, :idling)
  end

  def default_test
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

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