Sha256: b9e4ee0d366c8fb52a1a5e2e8d1c12c08c52cbcb3c7fc950ec3291506ac03fbe

Contents?: true

Size: 1.06 KB

Versions: 21

Compression:

Stored size: 1.06 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 '/templates/greeting'

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

    Then 'The default greeting' should be returned

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
mirage-3.0.0.alpha.12 features/save_and_revert.feature