Sha256: abdf7d79ed5ff8ead0db75a06fb4d51b07d89c164ac290e92de4dfe5aeec3957

Contents?: true

Size: 1.84 KB

Versions: 18

Compression:

Stored size: 1.84 KB

Contents

Feature: The client can be used for clearing responses from Mirage

  Background:
    Given the following gems are required to run the Mirage client test code:
    """
    require 'rubygems'
    require 'rspec'
    require 'mirage'
    """
    And I hit 'http://localhost:7001/mirage/set/greeting' with parameters:
      | response | Hello |

    And I hit 'http://localhost:7001/mirage/get/greeting' with request body:
    """
    Hello there
    """
    And I hit 'http://localhost:7001/mirage/set/leaving' with parameters:
      | response | Goodbye |

    And I hit 'http://localhost:7001/mirage/get/greeting' with request body:
    """
    I'm going
    """

  Scenario: Clearing everything
    When I run
    """
    Mirage::Client.new.clear
    """
    And I hit 'http://localhost:7001/mirage/get/greeting'
    Then a 404 should be returned

    When I hit 'http://localhost:7001/mirage/check/1'
    Then a 404 should be returned

    And I hit 'http://localhost:7001/mirage/get/leaving'
    Then a 404 should be returned

    When I hit 'http://localhost:7001/mirage/check/2'
    Then a 404 should be returned


  Scenario: Clearing all requests
    When I run
    """
    Mirage::Client.new.clear :requests
    """
    When I hit 'http://localhost:7001/mirage/check/1'
    Then a 404 should be returned

    When I hit 'http://localhost:7001/mirage/check/2'
    Then a 404 should be returned

  Scenario: Clearning a response
    Given I run
    """
    Mirage::Client.new.clear 1
    """
    When I hit 'http://localhost:7001/mirage/get/greeting'
    Then a 404 should be returned
    When I hit 'http://localhost:7001/mirage/check/1'
    Then a 404 should be returned

  Scenario: Clearning a request
    Given I run
    """
    Mirage::Client.new.clear :request => 1
    """
    When I hit 'http://localhost:7001/mirage/check/1'
    Then a 404 should be returned





Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mirage-1.3.6 features/client/clear.feature
mirage-1.3.5 features/client/clear.feature
mirage-1.3.4 features/client/clear.feature
mirage-1.3.3 features/client/clear.feature
mirage-1.3.2 features/client/clear.feature
mirage-1.3.1 features/client/clear.feature
mirage-1.3.0 features/client/clear.feature
mirage-1.2.0 features/client/clear.feature
mirage-1.1.0 features/client/clear.feature
mirage-1.0.2 features/client/clear.feature
mirage-1.0.1 features/client/clear.feature
mirage-1.0.0 features/client/clear.feature
mirage-0.1.7 features/client/clearing_responses.feature
mirage-0.1.6 features/client/clearing_responses.feature
mirage-0.1.5 features/client/clearing_responses.feature
mirage-0.1.4 features/client/clearing_responses.feature
mirage-0.1.3 features/client/clearing_responses.feature
mirage-0.1.2 features/client/clearing_responses.feature