Sha256: e63d551afe1b8f7971f855f9e32cd256cc7f4235953f8a17b4ccf9ad067b2f7a
Contents?: true
Size: 397 Bytes
Versions: 22
Compression:
Stored size: 397 Bytes
Contents
require 'spec_helper' describe Hash do context 'deep key' do before :all do @h = { a: %w(array_1 array_2), b: { c: { 'string_key' => 'finally' } } } end it 'should find the key' do expect(@h.deep_find(:a)).to eq %w(array_1 array_2) expect(@h.deep_find('string_key')).to eq 'finally' end end end
Version data entries
22 entries across 22 versions & 1 rubygems