class CallbackWithBlockTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/callback_test.rb, line 170 def setup @callback = StateMachine::Callback.new(:before) do |*args| @args = args end @object = Object.new @result = @callback.call(@object) end
test_should_be_successful()
click to toggle source
# File test/unit/callback_test.rb, line 179 def test_should_be_successful assert @result end
test_should_call_with_empty_context()
click to toggle source
# File test/unit/callback_test.rb, line 183 def test_should_call_with_empty_context assert_equal [@object], @args end