Sha256: 3c7d1791a6643be3b757df5361265648e08b6a57a1f5603882c11d5b49270a76

Contents?: true

Size: 485 Bytes

Versions: 12

Compression:

Stored size: 485 Bytes

Contents

require File.expand_path('../../../spec_helper', __FILE__)

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

12 entries across 12 versions & 1 rubygems

Version Path
hamster-0.3.6 spec/hamster/hash/size_spec.rb
hamster-0.3.5 spec/hamster/hash/size_spec.rb
hamster-0.3.4 spec/hamster/hash/size_spec.rb
hamster-0.3.3 spec/hamster/hash/size_spec.rb
hamster-0.3.2 spec/hamster/hash/size_spec.rb
hamster-0.3.1 spec/hamster/hash/size_spec.rb
hamster-0.3.0 spec/hamster/hash/size_spec.rb
hamster-0.2.13 spec/hamster/hash/size_spec.rb
hamster-0.2.12 spec/hamster/hash/size_spec.rb
hamster-0.2.11 spec/hamster/hash/size_spec.rb
hamster-0.2.9 spec/hamster/hash/size_spec.rb
hamster-0.2.8 spec/hamster/hash/size_spec.rb