Sha256: 36b1824987f533a085397070f3fd55c7dc135ce3565d53e15ff9c3b8f6986f9f

Contents?: true

Size: 292 Bytes

Versions: 3

Compression:

Stored size: 292 Bytes

Contents

require 'helper'

class TestMapWithIndex< Test::Unit::TestCase

  context 'Enumerable#map_with_index' do

    should "maps elements passing also de index to the block" do
      assert_equal ["", "short", "wordswords"], %w(some short words).map_with_index { |s, i| s * i }
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
modalsupport-0.9.2 test/test_map_with_index.rb
modalsupport-0.9.1 test/test_map_with_index.rb
modalsupport-0.9.0 test/test_map_with_index.rb