Sha256: f41c34a58a22863eba025073dad511d9fedb0e34e90ac9a370a57e5b18670ff3

Contents?: true

Size: 1.23 KB

Versions: 8

Compression:

Stored size: 1.23 KB

Contents

Feature: Snippets

  Cucumber helpfully prints out any undefined step definitions as a code
  snippet suggestion, which you can then paste into a step definitions
  file of your choosing.

  Scenario: Snippet for undefined step with a pystring
    Given a file named "features/undefined_steps.feature" with:
      """
      Feature:
      Scenario: pystring
        Given a pystring
        \"\"\"
          example with <html> entities
        \"\"\"
      """
    When I run `cucumber features/undefined_steps.feature -s`
    Then the output should contain:
      """
      Given(/^a pystring$/) do |string|
        pending # Write code here that turns the phrase above into concrete actions
      end
      """

  Scenario: Snippet for undefined step with a step table
    Given a file named "features/undefined_steps.feature" with:
      """
      Feature:
      Scenario: table
        Given a table
          | table |
          |example|
      """
    When I run `cucumber features/undefined_steps.feature -s`
    Then the output should contain:
      """
      Given(/^a table$/) do |table|
        # table is a Cucumber::Core::Ast::DataTable
        pending # Write code here that turns the phrase above into concrete actions
      end
      """

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cucumber-2.0.0.rc.3 features/docs/defining_steps/snippets.feature
cucumber-2.0.0.rc.2 features/docs/defining_steps/snippets.feature
cucumber-2.0.0.rc.1 features/docs/defining_steps/snippets.feature
cucumber-2.0.0.beta.5 features/docs/defining_steps/snippets.feature
cucumber-2.0.0.beta.4 features/docs/defining_steps/snippets.feature
cucumber-2.0.0.beta.3 features/docs/defining_steps/snippets.feature
cucumber-2.0.0.beta.2 features/docs/defining_steps/snippets.feature
cucumber-2.0.0.beta.1 features/docs/defining_steps/snippets.feature