Sha256: b99e081470ba413f8749d5f3e2c40d6b2196f9d4212534498ff314cf3ef5112c

Contents?: true

Size: 1.64 KB

Versions: 5

Compression:

Stored size: 1.64 KB

Contents

Feature: Run commands

  There are several steps to run commands with `aruba`.

  Background:
    Given I use a fixture named "cli-app"

  Scenario: Run command found in path
    Given an executable named "bin/aruba-test-cli" with:
    """
    #!/bin/bash
    exit 0
    """
    And a file named "features/run.feature" with:
    """
    Feature: Run it
      Scenario: Run command
        When I run `aruba-test-cli`
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Activate desired announcers when running command fails
    Given an executable named "bin/aruba-test-cli" with:
    """
    #!/bin/bash
    echo "Hello, I'm STDOUT"
    exit 1
    """
    And a file named "features/run.feature" with:
    """
    Feature: Run it
      Scenario: Run command
        When I successfully run `aruba-test-cli`
    """
    And I append to "features/support/env.rb" with:
    """
    Before do
      aruba.config.activate_announcer_on_command_failure = [:stdout]
    end
    """
    When I run `cucumber`
    Then the features should not pass
    And the output should contain:
    """
    <<-STDOUT
    Hello, I'm STDOUT

    STDOUT
    """

  Scenario: Run command found in "bin"-directory which is found in the current directory
    Given a file named "features/run.feature" with:
    """
    Feature: Run it
      Scenario: Run command
        Given an executable named "bin/local_cli" with:
        \"\"\"
        #!/bin/bash
        exit 0
        \"\"\"
        And I look for executables in "bin" within the current directory
        When I successfully run `local_cli`
    """
    When I run `cucumber`
    Then the features should all pass

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
aruba-0.14.14 features/03_testing_frameworks/cucumber/steps/command/run_a_command.feature
aruba-0.14.13 features/03_testing_frameworks/cucumber/steps/command/run_a_command.feature
aruba-0.14.12 features/03_testing_frameworks/cucumber/steps/command/run_a_command.feature
aruba-0.14.11 features/03_testing_frameworks/cucumber/steps/command/run_a_command.feature
aruba-0.14.10 features/03_testing_frameworks/cucumber/steps/command/run_a_command.feature