Sha256: 7ddafcabf79e2e5cecfa1cd7958867dc71d32d4c812263013669d26b8eb8cb21

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

@disableUnknownVariable
Feature: Avoid Outline for single Example
  As a Business Analyst
  I do not want a period at the end of the scenario
  so that it's easier to reuse verification steps

  Background: Prepare Testee

    Given a file named "lint.rb" with:
      """
      $LOAD_PATH << '../../lib'
      require 'gherkin_lint'

      linter = GherkinLint::GherkinLint.new
      linter.enable %w(AvoidOutlineForSingleExample)
      linter.set_linter
      linter.analyze 'lint.feature'
      exit linter.report

      """

  Scenario: Steps With Period
    Given a file named "lint.feature" with:
      """
      Feature: Test
        Scenario Outline: A
          When <A>
          Then <B>

        Examples: Invalid
          | A | B |
          | a | b |
      """
    When I run `ruby lint.rb`
    Then it should fail with exactly:
      """
      AvoidOutlineForSingleExample - Better write a scenario
        lint.feature (2): Test.A

      """

  Scenario: Valid Example
    Given a file named "lint.feature" with:
      """
      Feature: Test
        Scenario Outline: A
          When <A>
          Then <B>

        Examples: Invalid
          | A | B |
          | a | b |
          | c | d |
      """
    When I run `ruby lint.rb`
    Then it should pass with exactly:
      """
      """

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gherkin_lint-1.2.2 features/avoid_outline_for_single_example.feature
gherkin_lint-1.2.1 features/avoid_outline_for_single_example.feature
gherkin_lint-1.1.0 features/avoid_outline_for_single_example.feature