Sha256: 0eff34b84cd57699c7f28a2ed454688bc742c14b3016c8201a79966c597b418e

Contents?: true

Size: 1.8 KB

Versions: 1

Compression:

Stored size: 1.8 KB

Contents

Feature: Equal to
  It can be asserted that a value is equal to another value

  Scenario: Assorted positive and negative assertions.
    Given a file named "features/is_equal_to.feature" with:
      """

Feature: Assert value equality
  Scenario: String in response body
    When the response body is assigned:
      \"\"\"
      foo
      \"\"\"
    Then the value of the response body is equal to `foo`
    And the value of the response body is not equal to `foot`

  Scenario: Response Status
    When the response status is assigned `404`
    Then the value of the response status is equal to `404`
    And the value of the response status is not equal to `200`

  Scenario: Object in response body
    When the response body is assigned:
      \"\"\"
      {
        "foo": "bar"
      }
      \"\"\"
    Then the value of the response body is equal to:
      \"\"\"
      {"foo":"bar"}
      \"\"\"
    And the value of the response body is not equal to:
      \"\"\"
      {"foo": "baz"}
      \"\"\"

  Scenario: List in response body
    When the response body is assigned `[1, "foo", true]`
    Then the value of the response body is equal to `[1, "foo", true]`
    And the value of the response body is not equal to `[1, "bar", true]`

  Scenario Outline: Objects must match completely
    When the response body is assigned `{"foo": "bar", "baz": 1}`
    Then the value of the response body is not equal to `<comparison>`

  Examples:
    | comparison                           |
    | {}                                   |
    | {"foo": "bar"}                       |
    | {"foo": "bar", "baz": 1, "extra": 2} |
    | {"foo": "bar", "baz": 2}             |

      """
    When I run `cucumber --strict features/is_equal_to.feature`
    Then the output should contain:
      """
      8 passed
      """
    And it should pass

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brine-dsl-0.5.0 features/assertions/is_equal_to.feature