Sha256: 905066663b36d2737aa9fcb7e0b1937dd251b3e5f1211a8a469a98ea13fe5a4a

Contents?: true

Size: 407 Bytes

Versions: 4

Compression:

Stored size: 407 Bytes

Contents

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

describe Hamster::Hash do

  describe "#empty?" 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).empty?.should == result
      end

    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hamster-0.1.14 spec/hamster/hash/empty_spec.rb
hamster-0.1.13 spec/hamster/hash/empty_spec.rb
hamster-0.1.12 spec/hamster/hash/empty_spec.rb
hamster-0.1.11 spec/hamster/hash/empty_spec.rb