Sha256: b84b0276f73daa2c7adca417dcbd733b7b78deafc43ee8267b96f6467b16a590
Contents?: true
Size: 767 Bytes
Versions: 1
Compression:
Stored size: 767 Bytes
Contents
require "spec_helper" require "hamster/stack" describe Hamster do describe ".stack" do describe "with no arguments" do before do @stack = Hamster.stack end it "always returns the same instance" do @stack.should equal(Hamster.stack) end it "returns an empty stack" do @stack.should be_empty end end describe "with a number of items" do before do @stack = Hamster.stack("A", "B", "C") end it "always returns a different instance" do @stack.should_not equal(Hamster.stack("A", "B", "C")) end it "is the same as repeatedly using #push" do @stack.should == Hamster.stack.push("A").push("B").push("C") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hamster-1.0.1.pre.rc.1 | spec/hamster/stack/construction_spec.rb |