Sha256: 1ae6a3687a284117300cd4e082362d44df0d56c663aa2f65e42a7da7933134a6

Contents?: true

Size: 480 Bytes

Versions: 2

Compression:

Stored size: 480 Bytes

Contents

require File.expand_path('../../../fixtures/enumerator/classes', __FILE__)

ruby_version_is ""..."1.9" do
require 'enumerator'

  describe "Enumerator#enum_slice" do
    it "returns an enumerator of the receiver with iteration of each_slice for each slice of n elemts" do
      a = []
      enum = EnumSpecs::Numerous.new.enum_slice(4)
      enum.should be_an_instance_of(enumerator_class)
      enum.each { |e| a << e }
      a.should == [[2, 5, 3, 6], [1, 4]]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubysl-enumerator-2.0.0 spec/enum_slice_spec.rb
rubysl-enumerator-1.0.0 spec/enum_slice_spec.rb