Class: MachineCollectionFireImplicitWithActionErrorTest

Inherits:
MachineCollectionFireImplicitTest show all
Defined in:
lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb

Instance Method Summary collapse

Methods inherited from MachineCollectionFireImplicitTest

#default_test

Instance Method Details

#setupObject



517
518
519
520
521
522
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 517

def setup
  super
  
  @object.state_event = 'ignite'
  assert_raise(ArgumentError) { @machines.fire_event_attributes(@object, :save) { raise ArgumentError } }
end

#test_should_not_have_event_transitionObject



532
533
534
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 532

def test_should_not_have_event_transition
  assert_nil @object.send(:state_event_transition)
end

#test_should_not_reset_event_attributeObject



528
529
530
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 528

def test_should_not_reset_event_attribute
  assert_equal :ignite, @object.state_event
end

#test_should_not_transition_stateObject



524
525
526
# File 'lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb', line 524

def test_should_not_transition_state
  assert_equal 'parked', @object.state
end