<commit_before>RSpec.describe FilesController do
  before do
    sign_in create(:user)
  end

  describe 'GET /files' do
    before do
      get :index, site_id: site.id
    end

    context 'when site has no files' do
      let!(:site) { create(:site) }

      it 'redirect to new action' do
        expect(response).to redirect_to(action: :new)
      end

      context 'when another site has files' do
        let!(:welsh) { create(:site, :welsh, :with_files) }

        it 'not redirect to new action' do
          get :index, site_id: site.id
          expect(response).to_not redirect_to(action: :new)<commit_msg>Fix bad description on spec<commit_after>RSpec.describe FilesController do
  before do
    sign_in create(:user)
  end

  describe 'GET /files' do
    before do
      get :index, site_id: site.id
    end

    context 'when site has no files' do
      let!(:site) { create(:site) }

      it 'redirect to new action' do
        expect(response).to redirect_to(action: :new)
      end

      context 'when another site has files' do
        let!(:welsh) { create(:site, :welsh, :with_files) }

        it 'does not redirect to the new action' do
          get :index, site_id: site.id
          expect(response).to_not redirect_to(action: :new)
{'fraction_non_alphanumeric': 0.09833465503568596, 'fraction_numerical': 0.0, 'mean_word_length': 2.575070821529745, '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': '3618643', 'n_tokens_mistral': 401, 'n_tokens_neox': 387, 'n_words': 131}