Sha256: 1de83e457715224ba84a1cbe04d9bbaf0948bb201732a6e79efc7c6994812cad

Contents?: true

Size: 873 Bytes

Versions: 5

Compression:

Stored size: 873 Bytes

Contents

Feature: Inspecting Templates

  The client can be used to retrieve a template stored on Mirage.

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

  Scenario: retrieving a Template
    Given a template for 'greeting' has been set with a value of 'Hello'

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

    When GET is sent to '/requests/1'
    Then a 404 should be returned

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mirage-3.0.4 features/client/preview_responses.feature
mirage-3.0.3 features/client/preview_responses.feature
mirage-3.0.2 features/client/preview_responses.feature
mirage-3.0.1 features/client/preview_responses.feature
mirage-3.0.0 features/client/preview_responses.feature