<commit_before>@redo_bundle
Feature: Rspec
  Kender is able to run specs using the rspec tool.

  Background:
    Given a file named "Gemfile" with:
      """
      source 'https://rubygems.org'
      gem 'rspec', '~> 2.14'
      gem 'kender', path: '../../' # needed to use the latest code
      gem 'dice_bag', '~>0.7'
      """
    And I run `bundle install`

  Scenario: The project has no specs but Rspec is executed
    When I run `bundle exec rake ci`
    Then it should pass with:
    """
    0 examples, 0 failures
    """

  Scenario: The project has some passing specs to run
    Given a file named "spec/testing_spec.rb" with:
      """
      describe "My software" do
        it "works wonderfully" do
          true
        end
      end
      """
    When I run `bundle exec rake ci`
    Then it should pass with:
    """
    1 example, 0 failures
    """

  Scenario: The project has some non passing specs to run
    Given a file named "spec/testing_spec.rb" with:
      """
      describe "My software" do
        it "fails miserably" do
          expect(false).to eq(true
        end
      end
      """
    When I run `bundle exec rake ci`
    Then the exit status should not be 0<commit_msg>oops, forgot to close the parenthesis<commit_after>@redo_bundle
Feature: Rspec
  Kender is able to run specs using the rspec tool.

  Background:
    Given a file named "Gemfile" with:
      """
      source 'https://rubygems.org'
      gem 'rspec', '~> 2.14'
      gem 'kender', path: '../../' # needed to use the latest code
      gem 'dice_bag', '~>0.7'
      """
    And I run `bundle install`

  Scenario: The project has no specs but Rspec is executed
    When I run `bundle exec rake ci`
    Then it should pass with:
    """
    0 examples, 0 failures
    """

  Scenario: The project has some passing specs to run
    Given a file named "spec/testing_spec.rb" with:
      """
      describe "My software" do
        it "works wonderfully" do
          true
        end
      end
      """
    When I run `bundle exec rake ci`
    Then it should pass with:
    """
    1 example, 0 failures
    """

  Scenario: The project has some non passing specs to run
    Given a file named "spec/testing_spec.rb" with:
      """
      describe "My software" do
        it "fails miserably" do
          expect(false).to be_true
        end
      end
      """
    When I run `bundle exec rake ci`
    Then the exit status should not be 0
{'fraction_non_alphanumeric': 0.0915032679738562, 'fraction_numerical': 0.008169934640522876, 'mean_word_length': 2.068922305764411, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '5411174', 'n_tokens_mistral': 755, 'n_tokens_neox': 730, 'n_words': 310}