class TransitionCollectionWithActionHookTest

Public Instance Methods

setup() click to toggle source
# File test/unit/transition_collection_test.rb, line 1359
def setup
  super
  @result = StateMachine::TransitionCollection.new([@transition]).perform
end
test_should_have_event_transition_during_action() click to toggle source
# File test/unit/transition_collection_test.rb, line 1388
def test_should_have_event_transition_during_action
  assert_equal @transition, @object.state_event_transition_on_save
end
test_should_mark_event_transition_as_transient() click to toggle source
# File test/unit/transition_collection_test.rb, line 1396
def test_should_mark_event_transition_as_transient
  assert @transition.transient?
end
test_should_not_have_already_persisted_when_running_action() click to toggle source
# File test/unit/transition_collection_test.rb, line 1372
def test_should_not_have_already_persisted_when_running_action
  assert_equal 'parked', @object.state_on_save
end
test_should_not_have_event_during_action() click to toggle source
# File test/unit/transition_collection_test.rb, line 1380
def test_should_not_have_event_during_action
  assert_nil @object.state_event_on_save
end
test_should_not_write_event() click to toggle source
# File test/unit/transition_collection_test.rb, line 1384
def test_should_not_write_event
  assert_nil @object.state_event
end
test_should_not_write_event_transition() click to toggle source
# File test/unit/transition_collection_test.rb, line 1392
def test_should_not_write_event_transition
  assert_nil @object.send(:state_event_transition)
end
test_should_persist() click to toggle source
# File test/unit/transition_collection_test.rb, line 1376
def test_should_persist
  assert_equal 'idling', @object.state
end
test_should_run_action() click to toggle source
# File test/unit/transition_collection_test.rb, line 1368
def test_should_run_action
  assert @object.saved
end
test_should_succeed() click to toggle source
# File test/unit/transition_collection_test.rb, line 1364
def test_should_succeed
  assert_equal true, @result
end