Sha256: ca0f652b2efbe570c822189f2b766b8c2092fcc550ada371f30249551aba3047

Contents?: true

Size: 742 Bytes

Versions: 2

Compression:

Stored size: 742 Bytes

Contents

FancySpec describe: DynamicKeyHash with: {
  it: "has the correct keys & values defined" when: {
    dkh = DynamicKeyHash new
    dkh tap: @{
      name: "Chris"
      age: 25
      country: "Germany"
      nested: { yo: "off" }
    }

    hash = dkh hash
    Set[hash keys] is: $ Set[['name, 'age, 'country, 'nested]]
    hash['name] is: "Chris"
    hash['age] is: 25
    hash['country] is: "Germany"
    hash['nested] is_a?: Block . is: true
  }

  it: "returns a deeply nested hash correctly" when: {
    dkh = DynamicKeyHash new: true
    dkh tap: @{
      foo: @{
        bar: @{
          baz: "yo"
        }
      }
    }

    dkh hash is: <[
      'foo => <[
        'bar => <[
          'baz => "yo"
        ]>
      ]>
    ]>
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fancy-0.10.0 tests/dynamic_key_hash.fy
fancy-0.9.0 tests/dynamic_key_hash.fy