<commit_before>require 'ci/reporter/test_utils'

module CI::Reporter::TestUtils
  module SharedExamples
    shared_examples "nothing was output" do
      describe "stdout" do
        subject { result.system_out }
        it { should be_empty }
      end

      describe "stderr" do
        subject { result.system_err }
        it { should be_empty }
      end
    end

    shared_examples "a report with consistent attribute counts" do
      describe "the failure count" do
        subject { result.failures_count }
        it { should eql result.failures.count }
      end

      describe "the error count" do
        subject { result.errors_count }
        it { should eql result.errors.count }
      end

      describe "the test count" do
        subject { result.tests_count }
        it { should eql result.testcases.count }
      end
    end
  end
end<commit_msg>Add shared example for test frameworks that don't track assertion count<commit_after>require 'ci/reporter/test_utils'

module CI::Reporter::TestUtils
  module SharedExamples
    shared_examples "nothing was output" do
      describe "stdout" do
        subject { result.system_out }
        it { should be_empty }
      end

      describe "stderr" do
        subject { result.system_err }
        it { should be_empty }
      end
    end

    shared_examples "a report with consistent attribute counts" do
      describe "the failure count" do
        subject { result.failures_count }
        it { should eql result.failures.count }
      end

      describe "the error count" do
        subject { result.errors_count }
        it { should eql result.errors.count }
      end

      describe "the test count" do
        subject { result.tests_count }
        it { should eql result.testcases.count }
      end
    end

    shared_examples "assertions are not tracked" do
      describe "the assertion count" do
        subject { result.assertions_count }
        it { should eql 0 }
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.061522945032778616, 'fraction_numerical': 0.0005042864346949068, 'mean_word_length': 2.2, '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': '6604616', 'n_tokens_mistral': 560, 'n_tokens_neox': 531, 'n_words': 182}