Sha256: 86764b1cbd9e18311b4cf59faae22f13d5a738c655830bc20821fc106b0862f6

Contents?: true

Size: 361 Bytes

Versions: 246

Compression:

Stored size: 361 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' } }

  describe '#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

246 entries across 246 versions & 3 rubygems

Version Path
eac_tools-0.76.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.76.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.75.2 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.75.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.75.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.74.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.74.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.73.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.72.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.70.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.70.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.69.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.69.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.68.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.67.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.67.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.66.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.65.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.65.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb
eac_tools-0.64.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb