<commit_before>Feature: pending examples

  RSpec offers three ways to indicate that an example is disabled pending
  some action.
  
  Scenario: pending implementation
    Given the following spec:
      """
      describe "an example" do
        it "has not yet been implemented"
      end
      """
    When I run it with the spec command
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures, 1 pending"
    And the stdout should match "Not Yet Implemented"
    And the stdout should match "current_example.rb:2"
    
  Scenario: pending implementation with spec/test/unit
    Given the following spec:
      """
      require 'spec/test/unit'
      describe "an example" do
        it "has not yet been implemented"
      end
      """
    When I run it with the spec command
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures, 1 pending"
    And the stdout should match "Not Yet Implemented"
    And the stdout should match "current_example.rb:3"

  Scenario: pending any arbitary reason, with no block
    Given the following spec:
      """
      describe "an example" do
        it "is implemented but waiting" do
          pending("something else getting finished")
        end
      end
      """
    When I run it with the spec command
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures, 1 pending"
    And the stdout should match "(something else getting finished)"
    And the stdout should match "current_example.rb:3"

  Scenario: pending any arbitary reason, with a block
    Given the following spec:
      """
      describe "an example" do
        it "is implemented but waiting" do
          pending("something else getting finished") do
            raise "this is the failure"
          end
        end
      end
      """
    When I run it with the spec command
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures, 1 pending"
    And the stdout should match "(something else getting finished)"
    And the stdout should match "current_example.rb:3"

  Scenario: pending any arbitary reason, with a block that passes
    Given the following spec:
      """
      describe "an example" do
        it "is implemented but waiting" do
          pending("something else getting finished") do
            true.should be(true)
          end
        end
      end
      """
    When I run it with the spec command
    Then the exit code should be 256
    And the stdout should match "1 example, 1 failure"
    And the stdout should match "FIXED"
    And the stdout should match "Expected pending 'something else getting finished' to fail. No Error was raised."
    And the stdout should match "current_example.rb:3"
<commit_msg>converted pending feature to new step style<commit_after>Feature: pending examples

  RSpec offers three ways to indicate that an example is disabled pending
  some action.

  Scenario: pending implementation
    Given a file named "example_without_block_spec.rb" with:
      """
      describe "an example" do
        it "has not yet been implemented"
      end
      """
    When I run "spec example_without_block_spec.rb"
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures, 1 pending"
    And the stdout should match "Not Yet Implemented"
    And the stdout should match "example_without_block_spec.rb:2"

  Scenario: pending implementation with spec/test/unit
    Given a file named "example_without_block_spec.rb" with:
      """
      require 'spec/test/unit'
      describe "an example" do
        it "has not yet been implemented"
      end
      """
    When I run "spec example_without_block_spec.rb"
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures, 1 pending"
    And the stdout should match "Not Yet Implemented"
    And the stdout should match "example_without_block_spec.rb:3"

  Scenario: pending any arbitary reason, with no block
    Given a file named "pending_without_block_spec.rb" with:
      """
      describe "an example" do
        it "is implemented but waiting" do
          pending("something else getting finished")
        end
      end
      """
    When I run "spec pending_without_block_spec.rb"
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures, 1 pending"
    And the stdout should match "(something else getting finished)"
    And the stdout should match "pending_without_block_spec.rb:3"

  Scenario: pending any arbitary reason, with a block that fails
    Given a file named "pending_with_failing_block_spec.rb" with:
      """
      describe "an example" do
        it "is implemented but waiting" do
          pending("something else getting finished") do
            raise "this is the failure"
          end
        end
      end
      """
    When I run "spec pending_with_failing_block_spec.rb"
    Then the exit code should be 0
    And the stdout should match "1 example, 0 failures, 1 pending"
    And the stdout should match "(something else getting finished)"
    And the stdout should match "pending_with_failing_block_spec.rb:3"

  Scenario: pending any arbitary reason, with a block that passes
    Given a file named "pending_with_passing_block_spec.rb" with:
      """
      describe "an example" do
        it "is implemented but waiting" do
          pending("something else getting finished") do
            true.should be(true)
          end
        end
      end
      """
    When I run "spec pending_with_passing_block_spec.rb"
    Then the exit code should be 256
    And the stdout should match "1 example, 1 failure"
    And the stdout should match "FIXED"
    And the stdout should match "Expected pending 'something else getting finished' to fail. No Error was raised."
    And the stdout should match "pending_with_passing_block_spec.rb:3"

{'fraction_non_alphanumeric': 0.05571500928583488, 'fraction_numerical': 0.0087793347965558, 'mean_word_length': 2.65679012345679, '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': '3212725', 'n_tokens_mistral': 1593, 'n_tokens_neox': 1544, 'n_words': 741}