Sha256: 870d62b84f3f06870440b353d827c19deffb9d4390afd14e37534e0242d09dae

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

require 'spec_helper'

RSpec.describe Liquidize::Helper do
  describe '.recursive_stringify_keys' do
    let(:original) { { first: { a: 'a', b: 'b', c: 3}, second: :qwerty, third: [] } }
    let(:result) { { 'first' => { 'a' => 'a', 'b' => 'b', 'c' => 3}, 'second' => :qwerty, 'third' => [] } }

    it 'converts all keys to strings' do
      expect(Liquidize::Helper.recursive_stringify_keys(original)).to eq(result)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
liquidize-0.0.2 spec/lib/liquidize/helper_spec.rb
liquidize-0.0.1 spec/lib/liquidize/helper_spec.rb