method

assert_send

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_send(send_ary, m = nil)
public

Passes if the method send returns a true value.

send_array is composed of:

  • A receiver

  • A method

  • Arguments to the method

Example:

assert_send(["Hello world", :include?, "Hello"])    # -> pass
assert_send(["Hello world", :include?, "Goodbye"])  # -> fail