Sha256: 0f7db42268a09c6f31dcad816d63db2faf59fb8be1ceea7e5f89613702ba3265

Contents?: true

Size: 1.67 KB

Versions: 15

Compression:

Stored size: 1.67 KB

Contents

Feature: Paths
  Background:
    Given the JSON is:
      """
      {
        "array": [
          {
            "one": 1,
            "two": 2
          },
          {
            "four": 4,
            "three": 3
          }
        ],
        "hash": {
          "even": [
            6,
            8
          ],
          "odd": [
            5,
            7
          ]
        },
        "id": null
      }
      """

  Scenario: Base paths
    When I get the JSON
    Then the JSON should have "array"
    And the JSON should have "hash"
    And the JSON should have "id"

  Scenario: Nested paths
    When I get the JSON
    Then the JSON should have "array/0"
    And the JSON should have "array/1"
    And the JSON should have "hash/even"
    And the JSON should have "hash/odd"

  Scenario: Deeply nested paths
    When I get the JSON
    Then the JSON should have "array/0/one"
    And the JSON should have "array/0/two"
    And the JSON should have "array/1/four"
    And the JSON should have "array/1/three"
    And the JSON should have "hash/even/0"
    And the JSON should have "hash/even/1"
    And the JSON should have "hash/odd/0"
    And the JSON should have "hash/odd/1"

  Scenario: Ignored paths
    When I get the JSON
    Then the JSON should have "id"

  Scenario: Table format
    When I get the JSON
    Then the JSON should have the following:
      | array         |
      | hash          |
      | array/0       |
      | array/1       |
      | hash/even     |
      | hash/odd      |
      | array/0/one   |
      | array/0/two   |
      | array/1/four  |
      | array/1/three |
      | hash/even/0   |
      | hash/even/1   |
      | hash/odd/0    |
      | hash/odd/1    |

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
jsontest-1.0.0 features/paths.feature
json_spec-1.1.5 features/paths.feature
json_spec-1.1.4 features/paths.feature
json_spec-1.1.3 features/paths.feature
json_spec-1.1.2 features/paths.feature
json_spec-1.1.1 features/paths.feature
json_spec-1.1.0 features/paths.feature
json_spec-1.0.3 features/paths.feature
json_spec-1.0.2 features/paths.feature
json_spec-1.0.0 features/paths.feature
json_spec-0.8.1 features/paths.feature
json_spec-0.8.0 features/paths.feature
json_spec-0.7.0 features/paths.feature
json_spec-0.6.0 features/paths.feature
json_spec-0.5.0 features/paths.feature