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