class CallbackWithAroundTypeAndTerminatorTest

Public Instance Methods

setup() click to toggle source
# File test/unit/callback_test.rb, line 666
def setup
  @object = Object.new
end
test_should_not_halt_if_terminator_does_not_match() click to toggle source
# File test/unit/callback_test.rb, line 670
def test_should_not_halt_if_terminator_does_not_match
  callback = StateMachine::Callback.new(:around, :do => lambda {|block| block.call(false); false}, :terminator => lambda {|result| result == true})
  assert_nothing_thrown { callback.call(@object) }
end
test_should_not_halt_if_terminator_matches() click to toggle source
# File test/unit/callback_test.rb, line 675
def test_should_not_halt_if_terminator_matches
  callback = StateMachine::Callback.new(:around, :do => lambda {|block| block.call(false); false}, :terminator => lambda {|result| result == false})
  assert_nothing_thrown { callback.call(@object) }
end