Sha256: 5cf9fcdb170470ef7e9509933d01286e984aceb1375e0c5af230aea57cb451e6
Contents?: true
Size: 650 Bytes
Versions: 1
Compression:
Stored size: 650 Bytes
Contents
require "spec_helper" require "hamster/hash" describe Hamster::Hash do describe "#except" do before do @hash = Hamster.hash("A" => "aye", "B" => "bee", "C" => "see", nil => "NIL") end describe "with only keys that the Hash has" do it "returns a Hash without those values" do @hash.except("B", nil).should == Hamster.hash("A" => "aye", "C" => "see") end end describe "with keys that the Hash doesn't have" do it "returns a Hash without the values that it had keys for" do @hash.except("B", "A", 3).should == Hamster.hash("C" => "see", nil => "NIL") 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/except_spec.rb |