Sha256: 7c229e082bdd3724cccc9a7dc5e15d0688d770cca0e87faa9d81424f5784b6bf

Contents?: true

Size: 361 Bytes

Versions: 2

Compression:

Stored size: 361 Bytes

Contents

require "lib/hash_math"
describe "Hash math" do
  
  it "should add hashes" do
    ({:a => :b} + {:c => :d}).should == {:a => :b, :c => :d}
  end

  it "should subtract hashes" do
    ({:a => :b, :c => :d} - {:c => :d}).should == {:a => :b}
  end

  it "should subtract key/value pairs by key" do
    ({:a => :b, :c => :d} - :c).should == {:a => :b}
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
utility_belt-1.0.6 test/hash_math_spec.rb
utility_belt-1.0.5 test/hash_math_spec.rb