Sha256: 11674f1b5682cd5964de50e3dbbcbc823ceccd81389244f239145f3ef0e775e4

Contents?: true

Size: 360 Bytes

Versions: 8

Compression:

Stored size: 360 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/patches/hash/sym_keys_hash'

RSpec.describe ::Hash do
  let(:a_hash) { { 'a' => 'a_value', 1 => '1_value', s: 's_value' } }

  context '#to_sym_keys_hash' do
    it 'converts all keys to symbols' do
      expect(a_hash.to_sym_keys_hash).to eq(a: 'a_value', '1': '1_value', s: 's_value')
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ehbrs-tools-0.11.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
ehbrs-tools-0.10.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
ehbrs-tools-0.9.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
ehbrs-tools-0.7.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
ehbrs-tools-0.6.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
ehbrs-tools-0.5.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
ehbrs-tools-0.3.1 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
ehbrs-tools-0.3.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb