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

Version Path
FreedomCoder-utility_belt-1.1.1.2 spec/hash_math_spec.rb
FreedomCoder-utility_belt-1.1.1 spec/hash_math_spec.rb
akitaonrails-utility_belt-1.0.10 spec/hash_math_spec.rb
akitaonrails-utility_belt-1.0.11 spec/hash_math_spec.rb
akitaonrails-utility_belt-1.0.12 spec/hash_math_spec.rb
mguterl-utility_belt-1.0.7 spec/hash_math_spec.rb
rwilcox-utility_belt-1.0.7 spec/hash_math_spec.rb
rwilcox-utility_belt-1.0.9 spec/hash_math_spec.rb
timocratic-utility_belt-1.0.7.1 spec/hash_math_spec.rb
timocratic-utility_belt-1.0.7.2 spec/hash_math_spec.rb
timocratic-utility_belt-1.0.7.3 spec/hash_math_spec.rb
akitaonrails-utility_belt-1.0.13 spec/hash_math_spec.rb