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

Version Path
exact_target_rest-0.2.6 spec/lib/exact_target_rest/support/hash_extension_spec.rb
exact_target_rest-0.2.5 spec/lib/exact_target_rest/support/hash_extension_spec.rb
exact_target_rest-0.2.4 spec/lib/exact_target_rest/support/hash_extension_spec.rb
exact_target_rest-0.2.2 spec/lib/exact_target_rest/support/hash_extension_spec.rb
exact_target_rest-0.1.1 spec/lib/exact_target_rest/support/hash_extension_spec.rb
exact_target_rest-0.1.0 spec/lib/exact_target_rest/support/hash_extension_spec.rb