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-2.0.14 features/client/response.feature
mirage-2.0.13 features/client/response.feature
mirage-2.0.12 features/client/response.feature
mirage-2.0.11 features/client/response.feature
mirage-2.0.10 features/client/response.feature
mirage-2.0.9 features/client/response.feature
mirage-2.0.8 features/client/response.feature
mirage-2.0.7 features/client/response.feature
mirage-2.0.6 features/client/response.feature
mirage-2.0.5 features/client/response.feature
mirage-2.0.4 features/client/response.feature
mirage-2.0.3 features/client/response.feature
mirage-2.0.2 features/client/response.feature
mirage-2.0.1 features/client/response.feature
mirage-2.0.0 features/client/response.feature
mirage-2.0.0.alpha4 features/client/response.feature