<commit_before># require 'spec_helper'
# require 'resume/cli/application'

# RSpec.describe Resume::CLI::Application do
#   let(:locale) { :en }

#   before do
#     allow($stdout).to receive(:write) # suppress message cruft from stdout
#   end

#   describe '.start' do
#     let(:argument_parser) do
#       double('argument_parser', parse: true, locale: locale)
#     end
#     let(:application) { double('application') }

#     before do
#       stub_const(
#         'Resume::CLI::ArgumentParser',
#         double('ArgumentParser', new: argument_parser)
#       )
#     end

#     it 'creates a new Application, passing in the locale, and calls #start' do
#       expect(described_class).to \
#         receive(:new).with(locale).and_return(application)
#       expect(application).to receive(:start)
#       described_class.start
#     end
#   end

#   describe '#start' do
#     let(:application) { described_class.new(locale) }

#     describe 'install gems' do
#       let(:installer) do
#         double('installer', gems: { 'prawn' => '1.0.0' })
#       end

#       before do
#         stub_const(
#           'Resume::CLI::Installer',
#           double('GemInstaller', new: installer)
#         )
#       end

#       context 'when required gems are already installed' do
#         before do
#           allow(installer).to \
#             receive(:installation_required?).and_return(false)
#           allow(application).to receive(:generate_resume)
#           allow(application).to receive(:open_resume)
#         end

#         it 'does not request to install any gems' do
#           expect(application).to_not receive(:install_gems)
#           application.start
#         end
#       end

#       context 'when the required gems are not installed' do
#         before do
#           allow(installer).to \
#             receive(:installation_required?).and_return(true)
#           expect(application).to \
#             receive(:request_gem_installation).and_call_original
#         end

#         context 'when permission is granted to install the gems' do
#           before do
#             allow(application).to receive(:gets).and_return('yes')
#             allow(application).to receive(:generate_resume)
#             allow(application).to receive(:open_resume)
#           end

#           it 'attempts to install the gems' do
#             expect(installer).to receive(:install)
#             application.start
#           end
#         end

#         context 'when permission is not granted to install the gems' do
#           let(:starting_the_application) { -> { application.start } }

#           before do
#             allow(application).to receive(:gets).and_return('no')
#           end

#           it 'informs the user it cannot generate the resume and exits' do
#             expect(application).to \
#               receive(:inform_of_failure_to_generate_resume).and_call_original
#             expect(starting_the_application).to raise_error(SystemExit)
#           end
#         end
#       end
#     end

#     describe 'generate resume' do
#       let(:resume) { double('Resume::Document') }

#       before do
#         allow(application).to receive(:install_gems)
#         stub_const('Resume::PDF::Document', resume)
#         allow(application).to receive(:open_resume)
#       end

#       it 'generates the resume' do
#         expect(application).to \
#           receive(:inform_start_of_resume_generation).and_call_original
#         expect(resume).to receive(:generate).with(application)
#         expect(application).to \
#           receive(:inform_of_successful_resume_generation).and_call_original
#         application.start
#       end
#     end

#     describe 'open resume' do
#       let(:file_system) { double('FileSystem') }

#       before do
#         stub_const('Resume::CLI::FileSystem', file_system)
#         allow(application).to receive(:install_gems)
#         allow(application).to receive(:generate_resume)
#         expect(application).to \
#           receive(:request_to_open_resume).and_call_original
#       end

#       context 'when permission is granted to open the resume' do
#         before do
#           allow(application).to receive(:gets).and_return('yes')
#         end

#         it 'attempts to open the resume and thanks the reader' do
#           expect(file_system).to receive(:open_document).with(application)
#           expect(application).to \
#             receive(:thank_user_for_generating_resume).and_call_original
#           application.start
#         end
#       end

#       context 'when permission is not granted to open the resume' do
#         before do
#           allow(application).to receive(:gets).and_return('no')
#         end

#         it 'does not open the resume and thanks the reader' do
#           expect(file_system).to_not receive(:open_document)
#           expect(application).to \
#             receive(:thank_user_for_generating_resume).and_call_original
#           application.start
#         end
#       end
#     end
#   end
# end
<commit_msg>Pending specs for application spec<commit_after>require 'resume/cli/application'

module Resume
  module CLI
    RSpec.describe Application do
      pending 'needs specs'
    end
  end
end

{'fraction_non_alphanumeric': 0.10809785700739617, 'fraction_numerical': 0.0005689360895126114, 'mean_word_length': 2.3253467843631777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6632534', 'n_tokens_mistral': 1479, 'n_tokens_neox': 1468, 'n_words': 337}