Sha256: c83e47be952b04f42f0e48a042c85a000f9fd9250cec002905d46dc11d8a88ba

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

require "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

1 entries across 1 versions & 1 rubygems

Version Path
hamster-1.0.1.pre.rc.1 spec/hamster/hash/empty_spec.rb