Sha256: 89fe97ed41c6b765fac1708e454d6cfd4731a705f588e1ebc21250e045dfdf69
Contents?: true
Size: 691 Bytes
Versions: 2
Compression:
Stored size: 691 Bytes
Contents
require 'spec_helper' describe Ru::Iterator do describe "#to_a" do it "returns the array" do iterator = described_class.new(%w{john paul george ringo}) expect(iterator.to_a).to eq(%w{john paul george ringo}) end end describe "#to_stdout" do it "returns the string" do iterator = described_class.new(%w{john paul george ringo}) expect(iterator.to_stdout).to eq("john\npaul\ngeorge\nringo") end context "with a method called on it" do it "returns the string" do iterator = described_class.new(%w{john paul george ringo}) expect(iterator.to_s.to_stdout).to eq("john\npaul\ngeorge\nringo") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ru-0.1.4 | spec/lib/iterator_spec.rb |
ru-0.1.3 | spec/lib/iterator_spec.rb |