Sha256: 78a82f8769cad7e1fa66e87f122603cd44a5bd0826cc61d01a96b8e2272bbd4d

Contents?: true

Size: 507 Bytes

Versions: 13

Compression:

Stored size: 507 Bytes

Contents

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

require 'hamster/hash'

describe Hamster::Hash do

  [:empty?, :null?].each do |method|

    describe "##{method}" do

      [
        [[], true],
        [["A" => "aye"], false],
        [["A" => "aye", "B" => "bee", "C" => "see"], false],
      ].each do |pairs, result|

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

      end

    end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

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