Sha256: bc1962bcbd195e403bbf88247508c8bfcd1efe6f2ccad86d1c8c7ab0b9d79fae
Contents?: true
Size: 318 Bytes
Versions: 7
Compression:
Stored size: 318 Bytes
Contents
require 'minitest/autorun' require 'shenanigans/hash/extract' class Extract < MiniTest::Unit::TestCase def test_extract hash = { a: 1, b: 2, c: 3 } assert_equal hash.extract(:b, :a), { a: 1, b: 2 } assert_equal hash.extract(:a, :d), { a: 1} assert_equal Hash.new.extract(:a, :c), Hash.new end end
Version data entries
7 entries across 7 versions & 1 rubygems