Sha256: e933a51e379eb5a4f58ee036e25fa355da3e0633ef246aa8858687ba2a2d5d0d
Contents?: true
Size: 1.21 KB
Versions: 39
Compression:
Stored size: 1.21 KB
Contents
Feature: tools for hash manipulation In order to successfully work with hashes RightSupport should have a tested set of tools So the developers can trust each method Scenario: getting a value from a path Given a hash map with the form {"key1":"val1", "key2":{"key3":"val2"}} And a path array ["key2", "key3"] When I call the deep_get method Then The deep_get method response should be: val2 Scenario: setting a value on a path Given a hash map with the form {"key1":{"key4":{"key5":"no"}}, "key2":{"key3":"val2"}} And a path array ["key1", "key4", "key5"] And a value val3 When I call the deep_set! method Then The hash should be: {"key1":{"key4":{"key5":"val3"}}, "key2":{"key3":"val2"}} Scenario: merging two hashes Given a hash map with the form {"key1":"val1", "key2":{"key3":"val2"}} When I call the deep_merge! method with the source: {"key1":{"key4":"val3"}} Then The hash should be: {"key1":{"key4":"val3"}, "key2":{"key3":"val2"}} Scenario: subtracting a hash Given a hash map with the form {"key1":"val1", "key2":{"key3":"val2"}} When I call the deep_remove! method with the source: {"key1":"val1"} Then The hash should be: {"key2":{"key3":"val2"}}
Version data entries
39 entries across 39 versions & 1 rubygems