Sha256: c2f6bcf1f34dcbac801ed67de513b3550ff650f4079b678683c94229c6dbc6a1
Contents?: true
Size: 644 Bytes
Versions: 13
Compression:
Stored size: 644 Bytes
Contents
require_relative '../../test_helper' class TransitionCollectionEmptyWithBlockTest < StateMachinesTest def setup @transitions = StateMachines::TransitionCollection.new end def test_should_raise_exception_if_perform_raises_exception assert_raises(ArgumentError) { @transitions.perform { fail ArgumentError } } end def test_should_use_block_result_if_non_boolean assert_equal 1, @transitions.perform { 1 } end def test_should_use_block_result_if_false assert_equal false, @transitions.perform { false } end def test_should_use_block_reslut_if_nil assert_equal nil, @transitions.perform { nil } end end
Version data entries
13 entries across 13 versions & 2 rubygems