Sha256: 3080fb8feb9beeedd426eeb92a9900def2746925c8a871d159cd56bd989cfaeb

Contents?: true

Size: 1.36 KB

Versions: 4

Compression:

Stored size: 1.36 KB

Contents

Feature: Too Many Different Tags
  As a Business Analyst
  I want that there are not that many different tags used within my specification
  so that readers do not need to know that much context

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

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

      """

  Scenario: Many Different Tags
    Given a file named "lint.feature" with:
      """
      Feature: Test
        @A @B
        Scenario: A

        @C @D
        Scenario: A

        @E @F
        Scenario: A

        @G @H
        Scenario: A

        @I @J
        Scenario: A

        @K @L
        Scenario: A
      """
    When I run `ruby lint.rb`
    Then it should fail with exactly:
      """
      TooManyDifferentTags - Used 12 Tags within single Feature
        lint.feature (1): Test
      TooManyDifferentTags - Used 12 Tags across all Features
        lint.feature (1): Test

      """

  Scenario: Valid Example
    Given a file named "lint.feature" with:
      """
      Feature: Test
        Scenario: A
          When action
          Then verification
      """
    When I run `ruby lint.rb`
    Then it should pass with exactly:
      """
      """

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gherkin_lint-1.2.2 features/too_many_different_tags.feature
gherkin_lint-1.2.1 features/too_many_different_tags.feature
gherkin_lint-1.1.0 features/too_many_different_tags.feature
gherkin_lint-1.0.0 features/too_many_different_tags.feature