<commit_before>Feature: Rule

  After running an example mapping session, you end up with four kind of cards: features, rules, examples and questions.
  Since Gherkin 6, this is easily translated in your feature files.

  Background:
    Given a file named "features/rule.feature" with:
      """
      Feature: Rule Sample

        Rule: This is a rule
          Example: First example
            Given some context
            When I do an action
            Then some results should be there

          Example: Second example
            Given some context
            When I do another action
            Then some other results should be there


        Rule: This is a second rule with a tag
          @rule2_tag
          Example: Third example
            Given some other context
            When I do another action
            Then some results should be there
      """
    And a file named "features/step_definitions/steps.rb" with:
      """
      Given("some context") { }
      Given("some other context") { }
      When("I do an action") { }
      Then("some results should be there") { }
      When("I do another action") { }
      Then("some other results should be there") { }

      """

  Rule: I use Gherkin 6+
    Example: I can use the Rule keyword
      When I run `cucumber -q features/rule.feature`
      Then it should pass with exactly:
      """
      Feature: Rule Sample

        Example: First example
          Given some context
          When I do an action
          Then some results should be there

        Example: Second example
          Given some context
          When I do another action
          Then some other results should be there

        Example: Third example
          Given some other context
          When I do another action
          Then some results should be there

      3 scenarios (3 passed)
      9 steps (9 passed)
      """

  Rule: Filtering
    Example: I can filter on tagged rules using the CLI
      When I run `cucumber -q -t @rule2_tag`
      Then it should pass with exactly:
      """
      Feature: Rule Sample

        @rule2_tag
        Example: Third example
          Given some other context
          When I do another action
          Then some results should be there

      1 scenario (1 passed)
      3 steps (3 passed)
      """<commit_msg>Amend test to be failing, fix up other failing test to be correct (Once fixed)<commit_after>Feature: Rule

  After running an example mapping session, you end up with four kind of cards: features, rules, examples and questions.
  Since Gherkin 6, this is easily translated in your feature files.

  Background:
    Given a file named "features/rule.feature" with:
      """
      Feature: Rule Sample

        Rule: This is a rule
          Example: First example
            Given some context
            When I do an action
            Then some results should be there

          Example: Second example
            Given some context
            When I do another action
            Then some other results should be there

        @rule2_tag
        Rule: This is a second rule with a tag
          Example: Third example
            Given some other context
            When I do another action
            Then some results should be there
      """
    And a file named "features/step_definitions/steps.rb" with:
      """
      Given("some context") { }
      Given("some other context") { }
      When("I do an action") { }
      Then("some results should be there") { }
      When("I do another action") { }
      Then("some other results should be there") { }

      """

  Rule: I use Gherkin 6+
    Example: I can use the Rule keyword
      When I run `cucumber -q features/rule.feature`
      Then it should pass with exactly:
      """
      Feature: Rule Sample

        Example: First example
          Given some context
          When I do an action
          Then some results should be there

        Example: Second example
          Given some context
          When I do another action
          Then some other results should be there

        @rule2_tag
        Example: Third example
          Given some other context
          When I do another action
          Then some results should be there

      3 scenarios (3 passed)
      9 steps (9 passed)
      """

  Rule: Filtering
    Example: I can filter on tagged rules using the CLI
      When I run `cucumber -q -t @rule2_tag`
      Then it should pass with exactly:
      """
      Feature: Rule Sample

        @rule2_tag
        Example: Third example
          Given some other context
          When I do another action
          Then some results should be there

      1 scenario (1 passed)
      3 steps (3 passed)
      """
{'fraction_non_alphanumeric': 0.05217757205975174, 'fraction_numerical': 0.005680622764569746, 'mean_word_length': 1.8314472900536034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '345606', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1120, 'n_words': 581}