<commit_before>require "rails_helper"

RSpec.describe 'Viewing the category' do
  context "for fresh articles" do
    before { visit fresh_articles_path }

    it "displays a message when no such articles are found" do
      expect(page).to have_content("There are no fresh articles.")
    end

    context "with one article" do
      before { @article = create(:article, :fresh) }

      it "lists the article" do
        visit current_path
        expect(page).to have_content(@article.title)
      end
    end
  end

  context "for stale articles" do
    before { visit stale_articles_path }

    it "displays a message when no such articles are found" do
      expect(page).to have_content("There are no stale articles.")<commit_msg>Clean up articles in viewing categories spec<commit_after>require "rails_helper"

RSpec.describe 'Viewing the category' do
  before do
    Article.delete_all
  end

  context "for fresh articles" do
    before { visit fresh_articles_path }

    it "displays a message when no such articles are found" do
      expect(page).to have_content("There are no fresh articles.")
    end

    context "with one article" do
      before { @article = create(:article, :fresh) }

      it "lists the article" do
        visit current_path
        expect(page).to have_content(@article.title)
      end
    end
  end

  context "for stale articles" do
    before { visit stale_articles_path }

    it "displays a message when no such articles are found" do
      expect(page).to have_content("There are no stale articles.")
{'fraction_non_alphanumeric': 0.07304460245636717, 'fraction_numerical': 0.0, 'mean_word_length': 3.1061007957559683, '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': '1782998', 'n_tokens_mistral': 450, 'n_tokens_neox': 418, 'n_words': 167}