Sha256: 7a4628913794e6f89c34c467ea99d2e06bab613c22fbc35cde217bc560c06f5a

Contents?: true

Size: 498 Bytes

Versions: 15

Compression:

Stored size: 498 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../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

15 entries across 15 versions & 1 rubygems

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