Sha256: 0adc74df8754962c3b6a8f0341b8e78099b5c66ac7b552a8ff6071384bc93ecc
Contents?: true
Size: 429 Bytes
Versions: 12
Compression:
Stored size: 429 Bytes
Contents
require File.join(File.dirname(__FILE__), "spec_helper") require "lib/utility_belt/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
12 entries across 12 versions & 5 rubygems