Sha256: 889f80fef1d9396b5fbe39cda7b9f1c2ead8e18ab799dfa40dfb04fba877c773
Contents?: true
Size: 546 Bytes
Versions: 4
Compression:
Stored size: 546 Bytes
Contents
require 'spec_helper' module Alf describe Support, 'unsymbolize_keys' do include Support subject{ unsymbolize_keys(arg) } context 'with an empty Hash' do let(:arg){ Hash.new } it { should eq({}) } end context 'with a Hash with String keys' do let(:arg){ {"name" => "Jones", "id" => 2} } it { should eq(arg) } end context 'with a Hash with all symbols already' do let(:arg){ {:name => "Jones", :id => 2} } it { should eq({"name" => "Jones", "id" => 2}) } end end end
Version data entries
4 entries across 4 versions & 1 rubygems