Sha256: 3a029921a263880d48929ddda4cdc5c4edf61b196b0d4351fb6c1125a6e11a81
Contents?: true
Size: 409 Bytes
Versions: 6
Compression:
Stored size: 409 Bytes
Contents
require_relative '../_lib' require 'chalk-log' class Critic::Unit::Utils < Critic::Unit::Test describe '.explode_nested_hash' do it 'explodes nested keys' do hash = {foo: {bar: {baz: 'zom'}, zero: 'hello'}, hi: 'there'} exploded = Chalk::Log::Utils.explode_nested_hash(hash) assert_equal({"foo_bar_baz"=>"zom", "foo_zero"=>"hello", "hi"=>"there"}, exploded) end end end
Version data entries
6 entries across 6 versions & 1 rubygems