Sha256: 6bdea2b58e7012f27418601b6882e6df5f7bd2820687b3ba81fdd5b768b6b0cd
Contents?: true
Size: 323 Bytes
Versions: 6
Compression:
Stored size: 323 Bytes
Contents
require 'spec_helper' describe Hash do describe '#snake_to_camel' do it 'converts snake_case to CamelCase recursively' do expect({test_one: 'one'}.snake_to_camel).to eq({'TestOne' => 'one'}) expect({test_one: {test_two: 'two'}}.snake_to_camel).to eq({'TestOne' => {'TestTwo' => 'two'}}) end end end
Version data entries
6 entries across 6 versions & 1 rubygems