Sha256: 2f22dab1c4278a43491d274f4781bdf1ab41a5e1c182b1b48249e3e878a19fdd

Contents?: true

Size: 877 Bytes

Versions: 3

Compression:

Stored size: 877 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'
    """

#  Scenario: peeking a response
#    Given I send PUT to 'http://localhost:7001/mirage/templates/greeting' with body 'Hello'
#
#    When I run
#    """
#      Mirage::Client.new.peek(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.peek(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

3 entries across 3 versions & 1 rubygems

Version Path
mirage-2.0.0.alpha3 features/client/peek.feature
mirage-2.0.0.alpha2 features/client/peek.feature
mirage-2.0.0.alpha1 features/client/peek.feature