<commit_before>require 'spec_helper'

module Ci
  describe GitlabCiYamlProcessor, lib: true do
    let(:path) { 'path' }

    describe '#build_attributes' do
      describe 'coverage entry' do
        subject { described_class.new(config, path).build_attributes(:rspec) }

        describe 'code coverage regexp' do
          let(:config) do
            YAML.dump(rspec: { script: 'rspec',
                               coverage: '/Code coverage: \d+\.\d+/'})
          end

          it 'includes coverage regexp in build attributes' do
            expect(subject)<commit_msg>Fix Rubocop offense in legacy CI/CD config specs<commit_after>require 'spec_helper'

module Ci
  describe GitlabCiYamlProcessor, lib: true do
    let(:path) { 'path' }

    describe '#build_attributes' do
      describe 'coverage entry' do
        subject { described_class.new(config, path).build_attributes(:rspec) }

        describe 'code coverage regexp' do
          let(:config) do
            YAML.dump(rspec: { script: 'rspec',
                               coverage: '/Code coverage: \d+\.\d+/' })
          end

          it 'includes coverage regexp in build attributes' do
            expect(subject)
{'fraction_non_alphanumeric': 0.10151006711409397, 'fraction_numerical': 0.0, 'mean_word_length': 2.2418478260869565, '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': '967937', 'n_tokens_mistral': 336, 'n_tokens_neox': 324, 'n_words': 96}