Sha256: 60e7c6482c7e086c4a59808ae6e24cf7264e7afb44e952847d7e8b57a2c9d37c

Contents?: true

Size: 1.06 KB

Versions: 14

Compression:

Stored size: 1.06 KB

Contents

Feature: Rules
  You can place scenarios inside rules. This makes is possible to structure
  Gherkin documents in the same way as [example maps](https://cucumber.io/blog/bdd/example-mapping-introduction/).
  You can also use the Examples synonym for Scenario to make them even more similar.

  Rule: a sale cannot happen if change cannot be returned
    # sad path
    Example: no change
      Given there are 5 0.20 coins inside
      When the customer tries to buy a 0.85 chocolate with a 1 coin
      Then the sale should not happen

    # happy path
    Example: exact change
      Given there are 5 0.20 coins inside
      And there are 3 chocolates inside
      When the customer tries to buy a 0.80 chocolate with a 1 coin
      Then the customer's change should be 1 0.20 coin

  @some-tag
  Rule: a sale cannot happen if we're out of stock
    # sad path
    Example: no chocolates left
      Given there are no chocolates inside
      But there are 10 0.5 coins inside
      When the customer tries to buy a 0.85 chocolate with a 1 coin
      Then the sale should not happen

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
cucumber-compatibility-kit-13.0.2 features/rules/rules.feature
cucumber-compatibility-kit-13.0.1 features/rules/rules.feature
cucumber-compatibility-kit-13.0.0 features/rules/rules.feature
cucumber-compatibility-kit-12.0.0 features/rules/rules.feature
cucumber-compatibility-kit-11.3.0 features/rules/rules.feature
cucumber-compatibility-kit-11.2.0 features/rules/rules.feature
cucumber-compatibility-kit-11.0.1 features/rules/rules.feature
cucumber-compatibility-kit-11.0.0 features/rules/rules.feature
cucumber-compatibility-kit-10.0.0 features/rules/rules.feature
cucumber-compatibility-kit-9.2.1 features/rules/rules.feature
cucumber-compatibility-kit-9.2.0 features/rules/rules.feature
cucumber-compatibility-kit-9.1.2 features/rules/rules.feature
cucumber-compatibility-kit-9.1.1 features/rules/rules.feature
cucumber-compatibility-kit-9.1.0 features/rules/rules.feature