Sha256: acc394c41c1685b9efbafe43fab1521b7e5a647340a43c79abd8f9bcb4f57727

Contents?: true

Size: 373 Bytes

Versions: 23

Compression:

Stored size: 373 Bytes

Contents

describe "Enumerable#collect" do
  before :each do
    ScratchPad.record []
  end

  it "returns a new array with the results of passing each element to block" do
    entries = [0, 1, 3, 4, 5, 6]
    numerous = EnumerableSpecs::Numerous.new(*entries)
    numerous.collect { |i| i % 2 }.should == [0, 1, 1, 0, 1, 0]
    numerous.collect { |i| i }.should == entries
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
opal-0.3.41 spec/core/enumerable/collect_spec.rb
opal-0.3.40 spec/core/enumerable/collect_spec.rb
opal-0.3.39 spec/core/enumerable/collect_spec.rb
opal-0.3.38 spec/core/enumerable/collect_spec.rb
opal-0.3.37 spec/core/enumerable/collect_spec.rb
opal-0.3.36 spec/core/enumerable/collect_spec.rb
opal-0.3.35 spec/core/enumerable/collect_spec.rb
opal-0.3.34 spec/core/enumerable/collect_spec.rb
opal-0.3.33 spec/core/enumerable/collect_spec.rb
opal-0.3.32 spec/core/enumerable/collect_spec.rb
opal-0.3.31 spec/core/enumerable/collect_spec.rb
opal-0.3.30 spec/core/enumerable/collect_spec.rb
opal-0.3.29 spec/core/enumerable/collect_spec.rb
opal-0.3.28 spec/core/enumerable/collect_spec.rb
opal-0.3.27 spec/core/enumerable/collect_spec.rb
opal-0.3.26 spec/core/enumerable/collect_spec.rb
opal-0.3.25 spec/core/enumerable/collect_spec.rb
opal-0.3.22 spec/core/enumerable/collect_spec.rb
opal-0.3.21 test/core/enumerable/collect_spec.rb
opal-0.3.20 test/core/enumerable/collect_spec.rb