Sha256: b86a82d5d2f8f24417246f09a86dddde9d63dcd831cfc032350b6d89f63d5603

Contents?: true

Size: 579 Bytes

Versions: 1

Compression:

Stored size: 579 Bytes

Contents

require "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

1 entries across 1 versions & 1 rubygems

Version Path
hamster-1.0.1.pre.rc.1 spec/hamster/hash/construction_spec.rb