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

Version Path
facets-2.8.4 test/core/array/test_index.rb
facets-2.8.3 test/core/array/test_index.rb
facets-2.8.2 test/core/array/test_index.rb
facets-2.8.1 test/core/array/test_index.rb
facets-2.8.0 test/core/array/test_index.rb
facets-2.7.0 test/core/array/test_index.rb
facets-2.6.0 test/core/array/test_index.rb
facets-2.5.1 test/core/array/test_index.rb
facets-2.5.0 test/core/array/test_index.rb
facets-2.5.2 test/core/array/test_index.rb