Method: Test::Unit::Assertions#assert_include
- Defined in:
- lib/test/unit/assertions.rb
#assert_include(collection, object, message = nil) ⇒ Object Also known as: assert_includes
Passes if collection
includes object
.
1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 |
# File 'lib/test/unit/assertions.rb', line 1671 def assert_include(collection, object, =nil) _wrap_assertion do assert_respond_to(collection, :include?, "The collection must respond to :include?.") = (, "<?> was expected to include\n<?>.", collection, object) assert_block() do collection.include?(object) end end end |