<commit_before>require 'rails_helper'

RSpec.describe 'runs/_stats' do
  let(:run) do
    r = FactoryBot.create(:livesplit14_gametime_run)
    r.parse_into_db
    r.reload
    r
  end

  context 'with realtime timing' do
    it 'renders stats' do
      render(
        partial: 'runs/stats',
        locals: {
          run: run,
          timing: Run::REAL
        }
      )

      expect(view).to render_template('runs/_stats')
    end
  end

  context 'with gametime timing' do
    it 'renders stats' do
      render(
        partial: 'runs/stats',
        locals: {
          run: run,
          timing: Run::GAME
        }
      )

      expect(view).to render_template('runs/_stats')<commit_msg>Fix a test<commit_after>require 'rails_helper'

RSpec.describe 'runs/_stats' do
  let(:run) do
    r = FactoryBot.create(:livesplit16_gametime_run)
    r.parse_into_db
    r.reload
    r
  end

  context 'with realtime timing' do
    it 'renders stats' do
      render(
        partial: 'runs/stats',
        locals: {
          run: run,
          timing: Run::REAL
        }
      )

      expect(view).to render_template('runs/_stats')
    end
  end

  context 'with gametime timing' do
    it 'renders stats' do
      render(
        partial: 'runs/stats',
        locals: {
          run: run,
          timing: Run::GAME
        }
      )

      expect(view).to render_template('runs/_stats')
{'fraction_non_alphanumeric': 0.1043602573266619, 'fraction_numerical': 0.0028591851322373124, 'mean_word_length': 1.9350104821802936, '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': '3688689', 'n_tokens_mistral': 473, 'n_tokens_neox': 466, 'n_words': 107}