class TransitionCollectionEmptyWithBlockTest

Public Instance Methods

setup() click to toggle source
# File test/unit/transition_collection_test.rb, line 63
def setup
  @transitions = StateMachine::TransitionCollection.new
end
test_should_raise_exception_if_perform_raises_exception() click to toggle source
# File test/unit/transition_collection_test.rb, line 67
def test_should_raise_exception_if_perform_raises_exception
  assert_raise(ArgumentError) { @transitions.perform { raise ArgumentError } }
end
test_should_use_block_reslut_if_nil() click to toggle source
# File test/unit/transition_collection_test.rb, line 79
def test_should_use_block_reslut_if_nil
  assert_equal nil, @transitions.perform { nil }
end
test_should_use_block_result_if_false() click to toggle source
# File test/unit/transition_collection_test.rb, line 75
def test_should_use_block_result_if_false
  assert_equal false, @transitions.perform { false }
end
test_should_use_block_result_if_non_boolean() click to toggle source
# File test/unit/transition_collection_test.rb, line 71
def test_should_use_block_result_if_non_boolean
  assert_equal 1, @transitions.perform { 1 }
end