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

Gherkin should report an error when example groups have inconsistent headings #127

Open
andyw8 opened this issue Sep 17, 2011 · 1 comment

Comments

@andyw8
Copy link

andyw8 commented Sep 17, 2011

This came from a discussion with Matt Wynne about when using an scenario outline, does each example group need to have a header row?

The answer is yes, but if you forget to do this, Gherkin doesn't complain. As the example below shows, the row in the second example group is being treated as a header row, so the second example group is effectively empty.

I can't think of any valid situation where you would need different header rows in each group, so I think Gherkin should report an error if the header rows in each group differ.

$ bundle exec cucumber features/example.feature --dry-run
Feature: 

  Scenario Outline:   # features/example.feature:3
    When I view <page> # features/example_steps.rb:1
    Then something    # features/example_steps.rb:5

    Examples: 
      | page |
      | Golf |

    Examples: 
      | Rugby |

1 scenario (1 skipped)
2 steps (2 skipped)
@joefebrian
Copy link

okay something me agree with you, for gherkin error with example, but there are of not give example for opening issue can resolve, our can ask they problem, thanks

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