Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0a542e50a3
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (13 sloc) 0.429 kb
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
Jump to Line
Something went wrong with that request. Please try again.