method
assert_respond_to
v2_1_10 -
Show latest stable
- Class:
Test::Unit::Assertions
assert_respond_to(obj, (meth, priv), msg = nil)public
Tests if the given Object responds to method.
An optional failure message may be provided as the final argument.
assert_respond_to("hello", :reverse) #Succeeds assert_respond_to("hello", :does_not_exist) #Fails