Sha256: d0d270a746db9656f8d59bc9ac2ab95c39417ae74c9ebbb2006d3ea08b307891
Contents?: true
Size: 778 Bytes
Versions: 2
Compression:
Stored size: 778 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe Hamster::Stack do describe "#eql?" do before do @stack = Hamster.stack.push("A").push("B").push("C") end it "is true for the same instance" do @stack.should eql(@stack) end it "is true for two instances with the same sequence of values" do @stack.should eql(Hamster.stack.push("A").push("B").push("C")) end it "is false for two instances with the difference sequence of values" do @stack.should_not eql(Hamster.stack.push("A").push("C").push("B")) end it "is false for two instances with the similar but differently sized sequence of values" do @stack.should_not eql(Hamster.stack.push("A").push("B")) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hamster-0.1.12 | spec/hamster/stack/eql_spec.rb |
hamster-0.1.11 | spec/hamster/stack/eql_spec.rb |