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

Version Path
right_support-2.11.3 features/hash_tools.feature
right_support-2.11.2 features/hash_tools.feature
right_support-2.10.1 features/hash_tools.feature
right_support-2.9.6 features/hash_tools.feature
right_support-2.9.5 features/hash_tools.feature
right_support-2.9.4 features/hash_tools.feature
right_support-2.9.3 features/hash_tools.feature
right_support-2.9.2 features/hash_tools.feature
right_support-2.9.1 features/hash_tools.feature
right_support-2.8.46 features/hash_tools.feature
right_support-2.8.45 features/hash_tools.feature
right_support-2.8.44 features/hash_tools.feature
right_support-2.8.43 features/hash_tools.feature
right_support-2.8.42 features/hash_tools.feature
right_support-2.8.41 features/hash_tools.feature
right_support-2.8.40 features/hash_tools.feature
right_support-2.8.39 features/hash_tools.feature
right_support-2.8.38 features/hash_tools.feature
right_support-2.8.37 features/hash_tools.feature
right_support-2.8.36 features/hash_tools.feature