require File.join(File.dirname(__FILE__), '..', 'spec_helper') require 'core_ext/hash' describe SimplyUseful::CoreExtensions::Keys do describe ".deep_symbolize_keys" do it "should symbolize keys in a simple one-level hash" do t = {"a" => "b", "c" => 2} ta = t.deep_symbolize_keys te = {:a => "b", :c => 2} te.should == ta end it "should symbolize keys in a two-level deep hash" do t = {"a" => {"b" => "c"}} ta = t.deep_symbolize_keys te = {:a => {:b => "c"}} te.should == ta end end end