Sha256: a464004948a687e61d444abaaf569c3ef28a232a8659a924a486092c3f2ccd2b

Contents?: true

Size: 1.19 KB

Versions: 11

Compression:

Stored size: 1.19 KB

Contents

Feature: Having set up the Mirage with a number of defaults, your tests may continue to change its state.
  Clearing and resetting all of your responses, potentially hundreds of times, can be time expensive.

  Mirage provides the ability to save its current state and to revert back to that state.

  Background: The MockServer has been setup with some default responses
    Given the following template template:
    """
      {
         "response":{
            "body":"The default greeting"
         }
      }
    """
    And 'response.body' is base64 encoded
    And the template is sent using PUT to 'http://localhost:7001/mirage/templates/greeting'

    
  Scenario: Saving Mirage and reverting it
    Given PUT is sent to 'http://localhost:7001/mirage/backup'
    And the following template template:
    """
      {
         "response":{
            "body":"Changed"
         }
      }
    """
    And 'response.body' is base64 encoded
    And the template is sent using PUT to 'http://localhost:7001/mirage/templates/greeting'
    
    When PUT is sent to 'http://localhost:7001/mirage'
    And GET is sent to 'http://localhost:7001/mirage/responses/greeting'

    Then 'The default greeting' should be returned

Version data entries

11 entries across 11 versions & 1 rubygems

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