Sha256: 712ad8d176a4fcfd3d0661992df4a744cd520fa3bf34972bf7c4a7611a1c742b

Contents?: true

Size: 448 Bytes

Versions: 6

Compression:

Stored size: 448 Bytes

Contents

require 'spec_helper'

require 'hamster/hash'

describe Hamster::Hash do

  [:size, :length].each do |method|

    describe "##{method}" do

      [
        [[], 0],
        [["A" => "aye"], 1],
        [["A" => "bee", "B" => "bee", "C" => "see"], 3],
      ].each do |values, result|

        it "returns #{result} for #{values.inspect}" do
          Hamster.hash(*values).send(method).should == result
        end

      end

    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hamster-0.4.2 spec/hamster/hash/size_spec.rb
hamster-0.4.0 spec/hamster/hash/size_spec.rb
hamster-0.3.10 spec/hamster/hash/size_spec.rb
hamster-0.3.9 spec/hamster/hash/size_spec.rb
hamster-0.3.8 spec/hamster/hash/size_spec.rb
hamster-0.3.7 spec/hamster/hash/size_spec.rb