Sha256: 06e4a4bd1379529c19172620e8da1e27d3b9d7426220d69dc760e2e544262a4e

Contents?: true

Size: 1.14 KB

Versions: 25

Compression:

Stored size: 1.14 KB

Contents

Feature: Using star notation instead of Given/When/Then

  Cucumber supports the star notation when writing features: instead of
  using Given/When/Then, you can simply use a star rather like you would
  use a bullet point.

  When you run the feature for the first time, you still get a nice
  message showing you the code snippet you need to use to implement the
  step.

  Scenario: Use some *
    Given a file named "features/f.feature" with:
      """
      Feature: Star-notation feature
        Scenario: S
          * I have some cukes
      """
    When I run `cucumber features/f.feature`
    Then the stderr should not contain anything
    And it should pass with:
      """
      Feature: Star-notation feature

        Scenario: S           # features/f.feature:2
          * I have some cukes # features/f.feature:3

      1 scenario (1 undefined)
      1 step (1 undefined)
      """
    And it should pass with:
      """
      You can implement step definitions for undefined steps with these snippets:

      Given(/^I have some cukes$/) do
        pending # Write code here that turns the phrase above into concrete actions
      end
      """

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
cucumber-2.99.0 features/docs/gherkin/using_star_notation.feature
mobiusloop-0.1.5 features/docs/gherkin/using_star_notation.feature
cucumber-3.0.0.pre.1 features/docs/gherkin/using_star_notation.feature
cucumber-2.4.0 features/docs/gherkin/using_star_notation.feature
mobiusloop-0.1.3 features/docs/gherkin/using_star_notation.feature
mobiusloop-0.1.2 features/docs/gherkin/using_star_notation.feature
cucumber-2.3.3 features/docs/gherkin/using_star_notation.feature
cucumber-2.3.2 features/docs/gherkin/using_star_notation.feature
cucumber-2.3.1 features/docs/gherkin/using_star_notation.feature
cucumber-2.3.0 features/docs/gherkin/using_star_notation.feature
cucumber-2.2.0 features/docs/gherkin/using_star_notation.feature
cucumber-2.1.0 features/docs/gherkin/using_star_notation.feature
cucumber-2.0.2 features/docs/gherkin/using_star_notation.feature
cucumber-2.0.1 features/docs/gherkin/using_star_notation.feature
cucumber-2.0.0 features/docs/gherkin/using_star_notation.feature
cucumber-2.0.0.rc.5 features/docs/gherkin/using_star_notation.feature
cucumber-2.0.0.rc.4 features/docs/gherkin/using_star_notation.feature
cucumber-2.0.0.rc.3 features/docs/gherkin/using_star_notation.feature
cucumber-2.0.0.rc.2 features/docs/gherkin/using_star_notation.feature
cucumber-2.0.0.rc.1 features/docs/gherkin/using_star_notation.feature