Sha256: eca523ae81c235cded857c3d76648ccc717af666a4a472edf94b432f4720d8db
Contents?: true
Size: 443 Bytes
Versions: 3
Compression:
Stored size: 443 Bytes
Contents
covers 'facets/array/step.rb' test_case Array do method :step do test "iteration" do a = [:a, :b, :c, :d] r = [] a.step(2){ |e| r << e } r.assert == [:b, :d] end test "conversion to array" do a = [:a, :b, :c, :d] a.step(1).to_a.assert == [:a, :b, :c, :d] a.step(2).to_a.assert == [:b, :d] a.step(3).to_a.assert == [:c] a.step(5).to_a.assert == [] end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
facets-glimmer-3.2.0 | test/core/array/test_step.rb |
facets-3.1.0 | test/core/array/test_step.rb |
facets-3.0.0 | test/core/array/test_step.rb |