Sha256: 46e4acb6fd4e64045f3b46791e1cb76651c040139e443f3566784c1813c3517b

Contents?: true

Size: 1.57 KB

Versions: 11

Compression:

Stored size: 1.57 KB

Contents

Feature: Set environment variable via "cucumber"-step

  It is quite handy to modify the environment of a process. To make this
  possible, `aruba` provides several steps. One of these is
  `I set the environment variables to:`-step. Using this step sets the values of a
  non-existing variables and overwrites an existing values. Each variable name
  and each value is converted to a string. Otherwise `ruby` would complain
  about an invalid argument.

  Background:
    Given I use the fixture "cli-app"
    And an executable named "bin/cli" with:
    """
    #!/bin/bash

    echo $LONG_LONG_VARIABLE
    """

  Scenario: Set environment variable by using a step given in table
    Given a file named "features/home_variable.feature" with:
    """
    Feature: Environment Variable
      Scenario: Run command
        Given I set the environment variables to:
          | variable           | value      |
          | LONG_LONG_VARIABLE | long_value |
        When I run `cli`
        Then the output should contain:
        \"\"\"
        long_value
        \"\"\"
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Set single environment variable by using a step
    Given a file named "features/home_variable.feature" with:
    """
    Feature: Environment Variable
      Scenario: Run command
        Given I set the environment variable "LONG_LONG_VARIABLE" to "long_value"
        When I run `cli`
        Then the output should contain:
        \"\"\"
        long_value
        \"\"\"
    """
    When I run `cucumber`
    Then the features should all pass

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
aruba-0.14.9 features/steps/environment/set_environment_variable.feature
aruba-0.14.8 features/steps/environment/set_environment_variable.feature
aruba-0.14.7 features/steps/environment/set_environment_variable.feature
aruba-0.14.6 features/steps/environment/set_environment_variable.feature
aruba-0.14.5 features/steps/environment/set_environment_variable.feature
aruba-0.14.4 features/steps/environment/set_environment_variable.feature
aruba-0.14.3 features/steps/environment/set_environment_variable.feature
aruba-win-fix-0.14.2 features/steps/environment/set_environment_variable.feature
aruba-0.14.2 features/steps/environment/set_environment_variable.feature
aruba-0.14.1 features/steps/environment/set_environment_variable.feature
aruba-0.14.0 features/steps/environment/set_environment_variable.feature