Sha256: 6d9d843ce55ee7f3a03d64883d67d6f836b7bd97600855b5745725483b76a5e5
Contents?: true
Size: 499 Bytes
Versions: 5
Compression:
Stored size: 499 Bytes
Contents
$:.unshift "../lib" require "juggernaut" require "test/unit" require "shoulda" require "mocha" class TestUtils < Test::Unit::TestCase context "Hash" do should "symbolize keys" do obj = Object.new hsh = {"a" => 1, "b" => "string", "c" => obj} hsh.symbolize_keys! assert_nil hsh["a"] assert_equal 1, hsh[:a] assert_nil hsh["b"] assert_equal "string", hsh[:b] assert_nil hsh["c"] assert_equal obj, hsh[:c] end end end
Version data entries
5 entries across 5 versions & 2 rubygems