Sha256: 633706e59aea140cb62471f6c9a251cf8ac1f34658ebc824d0151057fdc305b7

Contents?: true

Size: 1.36 KB

Versions: 4

Compression:

Stored size: 1.36 KB

Contents

Feature: Be Declarative
  As a Customer
  I want to read declarative scenarios
  so that I'm able to understand how to set the system in the state and how to prove the state

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

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

      """

  Scenario: Non Declarative Scenario
    Given a file named "lint.feature" with:
      """
      Feature: Test
        Scenario: A
          Given a number 1
          And another number 2
          When add these numbers
          Then the result is 3
      """
    When I run `ruby lint.rb`
    Then it should pass with exactly:
      """
      BeDeclarative (Warning) - no verb
        lint.feature (3): Test.A step: a number 1
      BeDeclarative (Warning) - no verb
        lint.feature (4): Test.A step: another number 2

      """

  Scenario: Valid Example
    Given a file named "lint.feature" with:
      """
      Feature: Test
        Scenario: A
          Given a number is set to 1
          And another number is set to 2
          When add these numbers
          Then the result is 3
      """
    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/be_declarative.feature
gherkin_lint-1.2.1 features/be_declarative.feature
gherkin_lint-1.1.0 features/be_declarative.feature
gherkin_lint-1.0.0 features/be_declarative.feature