Sha256: c54ef239dc1523f920caa7d544f9082581f5cc89c8184daec570e25aca089551

Contents?: true

Size: 871 Bytes

Versions: 14

Compression:

Stored size: 871 Bytes

Contents

require_relative '../../test_helper'

class MachineWithActionUndefinedTest < StateMachinesTest
  def setup
    @klass = Class.new
    @machine = StateMachines::Machine.new(@klass, action: :save)
    @object = @klass.new
  end

  def test_should_define_an_event_attribute_reader
    assert @object.respond_to?(:state_event)
  end

  def test_should_define_an_event_attribute_writer
    assert @object.respond_to?(:state_event=)
  end

  def test_should_define_an_event_transition_attribute_reader
    assert @object.respond_to?(:state_event_transition, true)
  end

  def test_should_define_an_event_transition_attribute_writer
    assert @object.respond_to?(:state_event_transition=, true)
  end

  def test_should_not_define_action
    refute @object.respond_to?(:save)
  end

  def test_should_not_mark_action_hook_as_defined
    refute @machine.action_hook?
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

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