Sha256: 720e25670da8dd09ce019362bfc03d32e60bdb580936a3ddf550f01a4c42846c

Contents?: true

Size: 839 Bytes

Versions: 11

Compression:

Stored size: 839 Bytes

Contents

Feature: Parts of a response can be substitued for values found in the request body or query string.
  This allows dynamic content to be sent back to a client.

  To do this, substitution, matchers must be put in the the response value.

  Either a string literal or a regex can be used in between ${} to find a match

  Scenario: A response template populated from matches found in the request body using a regex
    Given the following template template:
    """
      {
         "response":{
            "body":"Hello ${name}"
         }
      }
    """
    And 'response.body' is base64 encoded
    And the template is sent using PUT to 'http://localhost:7001/mirage/templates/greeting'
    When I send GET to 'http://localhost:7001/mirage/responses/greeting' with parameters:
      |name|Joe  |
    Then 'Hello Joe' should be returned

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mirage-3.0.0.alpha.11 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.10 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.9 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.8 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.7 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.6 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.5 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.4 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.3 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.2 features/server/templates/put/put_with_substitutions.feature
mirage-3.0.0.alpha.1 features/server/templates/put/put_with_substitutions.feature