class CallbackWithDoMethodTest

Public Instance Methods

setup() click to toggle source
# File test/unit/callback_test.rb, line 125
def setup
  @callback = StateMachine::Callback.new(:before, :do => lambda {|*args| @args = args})
  
  @object = Object.new
  @result = @callback.call(@object)
end
test_should_be_successful() click to toggle source
# File test/unit/callback_test.rb, line 132
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 136
def test_should_call_with_empty_context
  assert_equal [@object], @args
end