Sha256: b96b278e9a4b6d0eeeb495e191b6fab826c1ce36aff2c26aa218922bc9d9d79f

Contents?: true

Size: 263 Bytes

Versions: 4

Compression:

Stored size: 263 Bytes

Contents

covers 'facets/array/index'

testcase Array do

  unit :index => "can handle a block" do
    i = [1,2,3].index{ |e| e == 2 }
    i.assert == 1
  end

  unit :index => "when no element is found" do
    i = [1,2,3].index{ |e| e == 5 }
    i.assert.nil?
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core/array/test_index.rb
facets-2.9.0 test/core/array/test_index.rb
facets-2.9.0.pre.2 test/core/array/test_index.rb
facets-2.9.0.pre.1 test/core/array/test_index.rb