<commit_before>require 'spec_helper'

describe CiStatusHelper do
  include IconsHelper

  let(:success_commit) { double("Ci::Pipeline", status: 'success') }
  let(:failed_commit) { double("Ci::Pipeline", status: 'failed') }

  describe '#ci_icon_for_status' do
    it 'renders to correct svg on success' do
      expect(helper.ci_icon_for_status(success_commit.status))
        .to have_content('status_success')
    end

    it 'renders the correct svg on failure' do
      expect(helper.ci_icon_for_status(failed_commit.status))
        .to have_content('status_failed')
    end
  end

  describe '#ci_text_for_status' do
    context 'when status is manual' do
      it 'changes the status to blocked' do
        expect(helper.ci_text_for_status('manual'))
          .to eq 'blocked'<commit_msg>Need to render it into String cause its a content_tag<commit_after>require 'spec_helper'

describe CiStatusHelper do
  include IconsHelper

  let(:success_commit) { double("Ci::Pipeline", status: 'success') }
  let(:failed_commit) { double("Ci::Pipeline", status: 'failed') }

  describe '#ci_icon_for_status' do
    it 'renders to correct svg on success' do
      expect(helper.ci_icon_for_status(success_commit.status).to_s)
        .to have_content('status_success')
    end

    it 'renders the correct svg on failure' do
      expect(helper.ci_icon_for_status(failed_commit.status).to_s)
        .to have_content('status_failed')
    end
  end

  describe '#ci_text_for_status' do
    context 'when status is manual' do
      it 'changes the status to blocked' do
        expect(helper.ci_text_for_status('manual'))
          .to eq 'blocked'
{'fraction_non_alphanumeric': 0.09975669099756691, 'fraction_numerical': 0.0, 'mean_word_length': 3.866863905325444, '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': '7233244', 'n_tokens_mistral': 520, 'n_tokens_neox': 503, 'n_words': 134}