Sha256: 097d47bfe4c4011a6b5157be36d47a93dc06b58e40642822451208a8e9db833e

Contents?: true

Size: 331 Bytes

Versions: 16

Compression:

Stored size: 331 Bytes

Contents

require "spec_helper"

describe Enumerator do
	describe "#with_iobject" do

		it "support mem_obj" do
			ret = [1,2].each.with_iobject [] do |v,i, m|
				m << v
			end
			ret.should == [1,2]
		end

		it "support offset" do
			ret = [1,2].each.with_iobject 2, [] do |v,i, m|
				m << i
			end
			ret.should == [2,3]
		end

	end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
tagen-1.1.7 spec/tagen/core/enumerator_spec.rb
tagen-1.1.6 spec/tagen/core/enumerator_spec.rb
tagen-1.1.5 spec/tagen/core/enumerator_spec.rb
tagen-1.1.4 spec/tagen/core/enumerator_spec.rb
tagen-1.1.3 spec/tagen/core/enumerator_spec.rb
tagen-1.1.2 spec/tagen/core/enumerator_spec.rb
tagen-1.1.1 spec/tagen/core/enumerator_spec.rb
tagen-1.1.0 spec/tagen/core/enumerator_spec.rb
tagen-1.0.4 spec/tagen/core/enumerator_spec.rb
tagen-1.0.3 spec/tagen/core/enumerator_spec.rb
tagen-1.0.2 spec/tagen/core/enumerator_spec.rb
tagen-1.0.1 spec/tagen/core/enumerator_spec.rb
tagen-1.0.0 spec/tagen/core/enumerator_spec.rb
tagen-0.2.5 spec/tagen/core/enumerator_spec.rb
tagen-0.2.4 spec/tagen/core/enumerator_spec.rb
tagen-0.2.3 spec/tagen/core/enumerator_spec.rb