Sha256: 234f46c54a040f9f603f22586a55924b353eb3264cac1c8cb8d71f1cc4392ef9
Contents?: true
Size: 558 Bytes
Versions: 1
Compression:
Stored size: 558 Bytes
Contents
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
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simply_useful-0.1.5 | spec/core_ext/hash_spec.rb |