Sha256: 02b0ec427ffb65b573fbe5302243363d8e1a2c7add6fca66de39544c1306b958

Contents?: true

Size: 1.11 KB

Versions: 18

Compression:

Stored size: 1.11 KB

Contents

Feature: Unique Scenario Names
  As a Customer
  I want unique scenario names
  so that I can refer to them in case of issues

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

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

      """

  Scenario: Unique Scenario Name for empty scenarios
    Given a file named "lint.feature" with:
      """
      Feature: Unique Scenario Names
        Scenario: A
        Scenario: A
      """
    When I run `ruby lint.rb`
    Then it should fail with exactly:
      """
      UniqueScenarioNames - 'Unique Scenario Names.A' used 2 times
        lint.feature (2): Unique Scenario Names.A
        lint.feature (3): Unique Scenario Names.A

      """

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

      """

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
gherkin_lint-0.6.3 features/unique_scenario_names.feature
gherkin_lint-0.6.2 features/unique_scenario_names.feature
gherkin_lint-0.6.1 features/unique_scenario_names.feature
gherkin_lint-0.6.0 features/unique_scenario_names.feature
gherkin_lint-0.5.0 features/unique_scenario_names.feature
gherkin_lint-0.4.4 features/unique_scenario_names.feature
gherkin_lint-0.4.3 features/unique_scenario_names.feature
gherkin_lint-0.4.2 features/unique_scenario_names.feature
gherkin_lint-0.4.1 features/unique_scenario_names.feature
gherkin_lint-0.4.0 features/unique_scenario_names.feature
gherkin_lint-0.3.1 features/unique_scenario_names.feature
gherkin_lint-0.3.0 features/unique_scenario_names.feature
gherkin_lint-0.1.2 features/unique_scenario_names.feature
gherkin_lint-0.1.1 features/unique_scenario_names.feature
gherkin_lint-0.1.0 features/unique_scenario_names.feature
gherkin_lint-0.0.14 features/unique_scenario_names.feature
gherkin_lint-0.0.13 features/unique_scenario_names.feature
gherkin_lint-0.0.12 features/unique_scenario_names.feature