<commit_before>describe Dee::Rails do
  let(:rails_root) { File.expand_path('../../fixture/rails_app', __FILE__) }

  before do
    require File.join(rails_root, 'lib', 'foo')
  end

  context 'before Dee::Rails.setup! is called' do
    describe 'Dee.container' do
      it 'should be error' do
        expect { Dee.container }.to raise_error
      end
    end
  end

  context 'after Dee::Rails.setup! is called' do
    describe 'Dee.container' do
      before do
        ::Rails = double('Rails')
        ::Rails.stub('root').and_return(rails_root)

        Dee::Rails.setup!
      end

      it 'should be Dee::Container' do
        expect(Dee.container).to be_a(Dee::Container)
      end
    end

    describe 'Dee["foo.singleton"]' do
      it 'should be a Foo object' do
        expect(Dee['foo.singleton']).to be_a(Foo)
        expect(Dee['foo.singleton'].name).to be_eql('FOO')
      end<commit_msg>Clear Rails constant<commit_after>describe Dee::Rails do
  let(:rails_root) { File.expand_path('../../fixture/rails_app', __FILE__) }

  before do
    require File.join(rails_root, 'lib', 'foo')
  end

  context 'before Dee::Rails.setup! is called' do
    describe 'Dee.container' do
      it 'should be error' do
        expect { Dee.container }.to raise_error
      end
    end
  end

  context 'after Dee::Rails.setup! is called' do
    describe 'Dee.container' do
      before do
        ::Rails = double('Rails')
        ::Rails.stub('root').and_return(rails_root)

        Dee::Rails.setup!
      end

      after(:all) do
        ::Rails = nil
      end

      it 'should be Dee::Container' do
        expect(Dee.container).to be_a(Dee::Container)
      end
    end

    describe 'Dee["foo.singleton"]' do
      it 'should be a Foo object' do
        expect(Dee['foo.singleton']).to be_a(Foo)
        expect(Dee['foo.singleton'].name).to be_eql('FOO')
      end
{'fraction_non_alphanumeric': 0.13226666666666667, 'fraction_numerical': 0.0, 'mean_word_length': 2.553030303030303, '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': '2094538', 'n_tokens_mistral': 660, 'n_tokens_neox': 623, 'n_words': 154}