<commit_before>describe Imap::Backup::Configuration::List do
  subject { described_class.new }

  let(:accounts) do
    [
      {username: "<EMAIL>"},
      {username: "<EMAIL>"}
    ]
  end
  let(:store) do
    instance_double(Imap::Backup::Configuration::Store, accounts: accounts)
  end
  let(:exists) { true }
  let(:connection1) do
    instance_double(Imap::Backup::Account::Connection, disconnect: nil)
  end
  let(:connection2) do
    instance_double(Imap::Backup::Account::Connection, disconnect: nil)
  end

  before do
    allow(Imap::Backup::Configuration::Store).to receive(:new) { store }
    allow(Imap::Backup::Configuration::Store).
      to receive(:exist?) { exists }
    allow(Imap::Backup::Account::Connection).
      to receive(:new).with(accounts[0]) { connection1 }
    allow(Imap::Backup::Account::Connection).
      to receive(:new).with(accounts[1]) { connection2 }
  end

  describe "#setup_logging" do
    let(:config_exists) { true }

    before do
      allow(Imap::Backup::Configuration::Store).
        to receive(:exist?) { config_exists }
      allow(Imap::Backup).to receive(:setup_logging)
    end

    it "sets global logging level" do
      expect(Imap::Backup).to receive(:setup_logging).with(store)

      subject.setup_logging
    end

    context "without a config" do
      let(:config_exists) { false }
<commit_msg>Fix spec<commit_after>describe Imap::Backup::Configuration::List do
  subject { described_class.new }

  let(:accounts) do
    [
      {username: "<EMAIL>"},
      {username: "<EMAIL>"}
    ]
  end
  let(:store) do
    instance_double(Imap::Backup::Configuration::Store, accounts: accounts)
  end
  let(:exists) { true }
  let(:connection1) do
    instance_double(Imap::Backup::Account::Connection, disconnect: nil)
  end
  let(:connection2) do
    instance_double(Imap::Backup::Account::Connection, disconnect: nil)
  end

  before do
    allow(Imap::Backup::Configuration::Store).to receive(:new) { store }
    allow(Imap::Backup::Configuration::Store).
      to receive(:exist?) { exists }
    allow(Imap::Backup::Account::Connection).
      to receive(:new).with(accounts[0]) { connection1 }
    allow(Imap::Backup::Account::Connection).
      to receive(:new).with(accounts[1]) { connection2 }
  end

  describe "#setup_logging" do
    let(:config_exists) { true }

    before do
      allow(Imap::Backup::Configuration::Store).
        to receive(:exist?) { config_exists }
      allow(Imap::Backup).to receive(:setup_logging)
      allow(store).to receive(:debug?)
    end

    it "sets global logging level" do
      expect(Imap::Backup).to receive(:setup_logging).with(store)

      subject.setup_logging
    end

    context "without a config" do
      let(:config_exists) { false }

{'fraction_non_alphanumeric': 0.14425872093023256, 'fraction_numerical': 0.00436046511627907, 'mean_word_length': 3.924865831842576, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5824064', 'n_tokens_mistral': 843, 'n_tokens_neox': 844, 'n_words': 165}