Sha256: be0ea66e82955b6ef1221d57ff7011ced01a4783651df91ae1895a940f1be734

Contents?: true

Size: 1.6 KB

Versions: 11

Compression:

Stored size: 1.6 KB

Contents

Feature: Stdout of commands which were executed

  In order to specify expected output
  As a developer using Cucumber
  I want to use the "the output should contain" step

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

  Scenario: Match output in stdout
    Given an executable named "bin/cli" with:
    """bash
    #!/usr/bin/env bash

    echo -e "hello\nworld"
    """
    And a file named "features/output.feature" with:
    """cucumber
    Feature: Run command
      Scenario: Run command
        When I run `cli`
        Then the stdout should contain "hello"
        Then the stderr should not contain "hello"
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Match stdout on several lines
    Given an executable named "bin/cli" with:
    """bash
    #!/usr/bin/env bash

    echo 'GET /'
    """
    And a file named "features/output.feature" with:
    """cucumber
    Feature: Run command
      Scenario: Run command
        When I run `cli`
        Then the stdout should contain:
        \"\"\"
        GET /
        \"\"\"
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Match output on several lines where stdout contains quotes
    Given an executable named "bin/cli" with:
    """bash
    #!/usr/bin/env bash

    echo 'GET "/"'
    """
    And a file named "features/output.feature" with:
    """cucumber
    Feature: Run command
      Scenario: Run command
        When I run `cli`
        Then the stdout should contain:
        \"\"\"
        GET "/"
        \"\"\"
    """
    When I run `cucumber`
    Then the features should all pass

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
aruba-0.11.0.pre4 features/commands/output/stdout.feature
aruba-0.11.0.pre3 features/commands/output/stdout.feature
aruba-0.11.0.pre2 features/commands/output/stdout.feature
aruba-0.11.0.pre features/commands/output/stdout.feature
aruba-0.10.2 features/commands/output/stdout.feature
aruba-0.10.1 features/commands/output/stdout.feature
aruba-0.10.0 features/commands/output/stdout.feature
aruba-0.10.0.pre2 features/commands/output/stdout.feature
aruba-0.10.0.pre features/commands/output/stdout.feature
aruba-0.9.0 features/commands/output/stdout.feature
aruba-0.9.0.pre2 features/commands/output/stdout.feature