Sha256: e132551ffc8bc05cf1d9f38a8816838f49c87c45e84379d1e9f2278629bf0343
Contents?: true
Size: 310 Bytes
Versions: 21
Compression:
Stored size: 310 Bytes
Contents
describe "Enumerable#each_with_index" do before :each do @b = EnumerableSpecs::Numerous.new(2, 5, 3, 6, 1, 4) end it "passes each element and its index to block" do @a = [] @b.each_with_index { |o, i| @a << [o, i] } @a.should == [[2, 0], [5, 1], [3, 2], [6, 3], [1, 4], [4, 5]] end end
Version data entries
21 entries across 21 versions & 1 rubygems