Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Doc strings and data tables edge cases #138

Open
jbpros opened this issue Oct 16, 2011 · 2 comments
Open

Doc strings and data tables edge cases #138

jbpros opened this issue Oct 16, 2011 · 2 comments

Comments

@jbpros
Copy link
Contributor

jbpros commented Oct 16, 2011

Consider the following scenario:

Feature:
  Scenario: one step with a doc string AND a data table
    Given the following things:
      """
      This is a doc string
      """
      | and | this | is    |
      | a   | data | table |
    Given some other step

Running Cucumber against it will display:

Feature: 

  Scenario: one step with a doc string AND a data table # features/test.feature:2
    Given the following things:                         # features/test.feature:3
      """
      This is a doc string
      """
    Given some other step                               # features/test.feature:9
      | and | this | is    |
      | a   | data | table |

I would have expected Gherkin's parser to throw an exception on this. And Cucumber should certainly not pass the data table to the second step.

Also:

Feature:
  Scenario: several doc strings passed to one step
    Given the following strings:
      """
      This is the first string
      """
      """
      This is the second string
      """

Outputs:

Feature: 

  Scenario: several doc strings passed to one step # features/test.feature:2
    Given the following strings:                   # features/test.feature:3
      """
      This is the second string
      """

Same goes here; Gherkin should yell at me.

@aslakhellesoy
Copy link
Contributor

Have you verified this with the ruby parser?

@jbpros
Copy link
Contributor Author

jbpros commented Oct 18, 2011

This was tested with Cucumber ruby (1.1.0).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants