Sha256: 44ca69250521bf4e4d529c439edb763376ab5df48ccd9805e24785fc1ce732fe
Contents?: true
Size: 294 Bytes
Versions: 6
Compression:
Stored size: 294 Bytes
Contents
require_relative '../test_helper' class HashTest < MiniTest::Test def test_seek my_hash = { a: 1, b: { c: 2 } } assert_equal my_hash.seek(:a), 1 assert_equal my_hash.seek(:b, :a), nil assert_equal my_hash.seek(:b, :c), 2 assert_equal my_hash.seek(:b), { c: 2 } end end
Version data entries
6 entries across 6 versions & 1 rubygems