Sha256: 570cd341814626587dc6b058ea1bac8ba75a2a3a6671c64079da15edfe882f7c
Contents?: true
Size: 393 Bytes
Versions: 6
Compression:
Stored size: 393 Bytes
Contents
# frozen_string_literal: true describe LokaliseManager::Utils::HashUtils do using described_class let(:h1) { {a: 100, b: 200, c: {c1: 100}} } let(:h2) { {b: 250, c: {c1: 200}} } specify '#deep_merge' do result = h1.deep_merge(h2) { |_key, this_val, other_val| this_val + other_val } expect(result[:b]).to eq(450) expect(result[:c][:c1]).to eq(300) end end
Version data entries
6 entries across 6 versions & 1 rubygems