Sha256: df5136bc4603ce970a3d6a090c47f79605295f3ce78c164809cb3d6474b6ee16

Contents?: true

Size: 1.02 KB

Versions: 6

Compression:

Stored size: 1.02 KB

Contents

@command_line
Feature: The client API can be used to start Mirage.

  Both the port and default templates directory can be specified

  On starting Mirage a client is returned.


  Background:
    Given the following require statements are needed:
    """
    require 'rubygems'
    require 'mirage/client'
    """

  Scenario: Starting Mirage on the default port
    When I run
    """
    Mirage.start
    """
    Then mirage should be running on 'http://localhost:7001'


  Scenario: Starting Mirage on a custom port
    When I run
    """
    Mirage.start :port => 9001
    """
    Then mirage should be running on 'http://localhost:9001'


  Scenario: Specifying a custom templates directory.
    And the file './custom_responses_location/default_greetings.rb' contains:
    """
    prime do |mirage|
      mirage.templates.put('greeting', 'hello')
    end
    """
    When I run
    """
    Mirage.start :defaults => './custom_responses_location'
    """
    And GET is sent to '/responses/greeting'
    Then 'hello' should be returned

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mirage-3.0.0.alpha.17 features/client/start.feature
mirage-3.0.0.alpha.16 features/client/start.feature
mirage-3.0.0.alpha.15 features/client/start.feature
mirage-3.0.0.alpha.14 features/client/start.feature
mirage-3.0.0.alpha.13 features/client/start.feature
mirage-3.0.0.alpha.12 features/client/start.feature