Sha256: 33bc6f1365ec139266b259e32f016bb299597f0c5d8ce77544aaf73109bbeb7c

Contents?: true

Size: 338 Bytes

Versions: 5

Compression:

Stored size: 338 Bytes

Contents

covers 'facets/enumerable/map_with_index'

test_case Enumerable do

  method :map_with_index do

    test do
      a = [1,2,3].map_with_index{ |e,i| e*i }
      a.assert == [0,2,6]
    end

  end

  method :collect_with_index do

    test do
      a = [1,2,3].collect_with_index{ |e,i| e*i }
      a.assert == [0,2,6]
    end

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 test/core/enumerable/test_map_with_index.rb
facets-3.1.0 test/core/enumerable/test_map_with_index.rb
facets-3.0.0 test/core/enumerable/test_map_with_index.rb
facets-2.9.3 test/core/enumerable/test_map_with_index.rb
facets-2.9.2 test/core/enumerable/test_map_with_index.rb