Sha256: eede13014255f9de8ec46cd8c0744a78ee559da5dc4a2d9ef2023b5d32282bd0
Contents?: true
Size: 670 Bytes
Versions: 1
Compression:
Stored size: 670 Bytes
Contents
require File.expand_path('../../test_helper', __FILE__) module Rainforest class UtilTest < Test::Unit::TestCase should "symbolize_names should convert names to symbols" do start = { 'foo' => 'bar', 'array' => [{ 'foo' => 'bar' }], 'nested' => { 1 => 2, :symbol => 9, 'string' => nil } } finish = { :foo => 'bar', :array => [{ :foo => 'bar' }], :nested => { 1 => 2, :symbol => 9, :string => nil } } symbolized = Rainforest::Util.symbolize_names(start) assert_equal(finish, symbolized) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rainforest-1.0.1 | test/stripe/util_test.rb |