Sha256: 80688d94790c121c922316141f4e7f21b522409ca5045f7b8f7efcb45c1ab1e3

Contents?: true

Size: 882 Bytes

Versions: 36

Compression:

Stored size: 882 Bytes

Contents

Feature: the client can be used for peeking at responses hosted on Mirage.

  Background:
    Given the following gems are required to run the Mirage client test code:
    """
    require 'rubygems'
    require 'rspec'
    require 'mirage/client'
    """

  Scenario: peeking a response
    Given I send PUT to 'http://localhost:7001/mirage/templates/greeting' with body 'Hello'

    When I run
    """
      Mirage::Client.new.response(1).should == 'Hello'
    """

    When I send GET to 'http://localhost:7001/mirage/requests/1'
    Then a 404 should be returned

  Scenario: getting a response that does not exist
    Given I run
    """
    begin
      Mirage::Client.new.response(2).should == 'this should not have happened'
      fail("Error should have been thrown")
    rescue Exception => e
    puts e
      e.is_a?(Mirage::ResponseNotFound).should == true
    end
    """

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
mirage-3.0.0.alpha.11 features/client/preview_responses.feature
mirage-3.0.0.alpha.10 features/client/preview_responses.feature
mirage-3.0.0.alpha.9 features/client/preview_responses.feature
mirage-3.0.0.alpha.8 features/client/preview_responses.feature
mirage-3.0.0.alpha.7 features/client/preview_responses.feature
mirage-3.0.0.alpha.6 features/client/preview_responses.feature
mirage-3.0.0.alpha.5 features/client/preview_responses.feature
mirage-3.0.0.alpha.4 features/client/preview_responses.feature
mirage-3.0.0.alpha.3 features/client/preview_responses.feature
mirage-3.0.0.alpha.2 features/client/preview_responses.feature
mirage-3.0.0.alpha.1 features/client/preview_responses.feature
mirage-2.4.2 features/client/preview_responses.feature
mirage-2.4.1 features/client/preview_responses.feature
mirage-2.4.0 features/client/preview_responses.feature
mirage-2.3.0 features/client/preview_responses.feature
mirage-2.2.3 features/client/response.feature
mirage-2.2.2 features/client/response.feature
mirage-2.1.2 features/client/response.feature
mirage-2.0.16 features/client/response.feature
mirage-2.0.15 features/client/response.feature