Sha256: dcdcb262f318872f06f36651ffb3432acc9fcbd80bb9a78dd8a6140b098dad8a
Contents?: true
Size: 298 Bytes
Versions: 10
Compression:
Stored size: 298 Bytes
Contents
require 'test/unit' require 'facets/array/index' class TC_Array_Index < Test::Unit::TestCase def test_index_with_block i = [1,2,3].index{ |e| e == 2 } assert_equal(1, i) end def test_when_no_element_is_found i = [1,2,3].index{ |e| e == 5 } assert_equal(nil, i) end end
Version data entries
10 entries across 10 versions & 1 rubygems