method

assert_respond_to

ruby latest stable - Class: Test::Unit::Assertions

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_1_10) is shown here.

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