<commit_before>require File.dirname(__FILE__) + '/../../../spec_helper.rb'

module Spec
  module Runner
    describe CommandLine do
      it "should not output twice" do
        dir = File.dirname(__FILE__)
        output =`ruby #{dir}/output_one_time_with_test_unit_fixture_runner.rb`
        output.should include("1 example, 0 failures")
        output.should_not include("0 examples, 0 failures")
      end

      it "when no tests are run, does not output test/unit summary" do
        dir = File.dirname(__FILE__)
        output =`ruby #{dir}/output_one_time_with_test_unit_fixture_runner.rb`
        output.should_not include("Started")
        output.should_not include("tests")
        output.should_not include("assertions")
        output.should_not include("0 tests, 0 assertions, 0 failures, 0 errors")
      end

      it "when tests are run, output test/unit sumary" do
        dir = File.dirname(__FILE__)
        output =`ruby #{dir}/sample_spec_test.rb`
        output.should include("Started")
        output.should include("tests")
        output.should include("assertions")
        output.should include("1 tests, 1 assertions, 0 failures, 0 errors")
      end
    end
  end
end<commit_msg>resolve spec failing in jruby<commit_after>require File.dirname(__FILE__) + '/../../../spec_helper.rb'

module Spec
  module Runner
    describe CommandLine do
      it "should not output twice" do
        dir = File.dirname(__FILE__)
        output =`ruby #{dir}/output_one_time_with_test_unit_fixture_runner.rb`
        output.should include("1 example, 0 failures")
        output.should_not include("0 examples, 0 failures")
      end

      it "when no tests are run, does not output test/unit summary" do
        dir = File.dirname(__FILE__)
        output =`ruby #{dir}/output_one_time_with_test_unit_fixture_runner.rb`
        output.should_not include("Started")
        output.should_not match(/\btests\b/)
        output.should_not include("assertions")
        output.should_not include("0 tests, 0 assertions, 0 failures, 0 errors")
      end

      it "when tests are run, output test/unit sumary" do
        dir = File.dirname(__FILE__)
        output =`ruby #{dir}/sample_spec_test.rb`
        output.should include("Started")
        output.should include("tests")
        output.should include("assertions")
        output.should include("1 tests, 1 assertions, 0 failures, 0 errors")
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10237510237510238, 'fraction_numerical': 0.009828009828009828, 'mean_word_length': 2.847244094488189, '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': '5043735', 'n_tokens_mistral': 717, 'n_tokens_neox': 685, 'n_words': 199}