Sha256: c6fb12957482b075360d6d8a06e313f68b08c745a583755173cc742997c6a2ff

Contents?: true

Size: 629 Bytes

Versions: 15

Compression:

Stored size: 629 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

require 'hamster/hash'

describe Hamster::Hash do

  describe ".hash" do

    describe "with nothing" do

      before do
        @hash = Hamster.hash
      end

      it "returns an empty hash" do
        @hash.should be_empty
      end

    end

    describe "with an implicit hash" do

      before do
        @hash = Hamster.hash("A" => "aye", "B" => "bee", "C" => "see")
      end

      it "is equivalent to repeatedly using #put" do
        @hash.should == Hamster.hash.put("A", "aye").put("B", "bee").put("C", "see")
      end

    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hamster-0.2.5 spec/hamster/hash/construction_spec.rb
hamster-0.2.4 spec/hamster/hash/construction_spec.rb
hamster-0.2.3 spec/hamster/hash/construction_spec.rb
hamster-0.2.2 spec/hamster/hash/construction_spec.rb
hamster-0.2.1 spec/hamster/hash/construction_spec.rb
hamster-0.2.0 spec/hamster/hash/construction_spec.rb
hamster-0.1.23 spec/hamster/hash/construction_spec.rb
hamster-0.1.22 spec/hamster/hash/construction_spec.rb
hamster-0.1.21 spec/hamster/hash/construction_spec.rb
hamster-0.1.20 spec/hamster/hash/construction_spec.rb
hamster-0.1.19 spec/hamster/hash/construction_spec.rb
hamster-0.1.18 spec/hamster/hash/construction_spec.rb
hamster-0.1.17 spec/hamster/hash/construction_spec.rb
hamster-0.1.16 spec/hamster/hash/construction_spec.rb
hamster-0.1.15 spec/hamster/hash/construction_spec.rb