Sha256: 53f90899860e51c964c3494b36f88f4c2ca69770745b6fe19034e247e875b7fc
Contents?: true
Size: 789 Bytes
Versions: 6
Compression:
Stored size: 789 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') require 'hamster/list' describe Hamster::List do describe "#init" do it "is lazy" do lambda { Hamster.stream { false }.init }.should_not raise_error end [ [[], []], [["A"], []], [["A", "B", "C"], ["A", "B"]], ].each do |values, expected| describe "on #{values.inspect}" do before do @original = Hamster.list(*values) @result = @original.init end it "preserves the original" do @original.should == Hamster.list(*values) end it "returns the list without the last element: #{expected.inspect}" do @result.should == Hamster.list(*expected) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems