Sha256: 56cb9ac112ac92546b9b8fa3b7f28036608ce7b996259bdd6c4a02dacac29e9a

Contents?: true

Size: 278 Bytes

Versions: 4

Compression:

Stored size: 278 Bytes

Contents

covers 'facets/enumerable/map_with_index'

tests Enumerable do

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

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

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core/enumerable/test_map_with_index.rb
facets-2.9.0 test/core/enumerable/test_map_with_index.rb
facets-2.9.0.pre.2 test/core/enumerable/test_map_with_index.rb
facets-2.9.0.pre.1 test/core/enumerable/test_map_with_index.rb