<commit_before>require "spec_helper"

module NessusDB
	module CLI
		describe Application do
			before(:all) do
				@app = Application.new
					
				printf "%s\n\n", @app.inspect						
			end
			
			it "should create a config file for Application.create_config" do				
				file_name = (1...25).map{65.+(rand(25)).chr}.join
				@app.create_config("/tmp/#{file_name}")
				sleep(1)
				result = File.exist?("/tmp/#{file_name}")
				File.delete("/tmp/#{file_name}") if result
				result.should == true
			end
			
			it "should return true for Application.test_connection" do
				@app.test_connection?[0].should == true
			end
			
			#parser_file
			#run
			#parse_options
			#consolize
			
		end
	end
end<commit_msg>Added cleanup after the test<commit_after>require "spec_helper"

module NessusDB
	module CLI
		describe Application do
			before(:all) do
				@app = Application.new
					
				printf "\n%s\n\n", @app.inspect						
			end
			
			after(:all) do
				Report.delete_all
				Host.delete_all
				Plugin.delete_all
				Item.delete_all
				FamilySelection.delete_all
				IndividualPluginSelection.delete_all
				PluginsPreference.delete_all
				Policy.delete_all
				Reference.delete_all
				ServerPreference.delete_all
				Version.delete_all
			end
			
			it "should create a config file for Application.create_config" do				
				file_name = (1...25).map{65.+(rand(25)).chr}.join
				@app.create_config("/tmp/#{file_name}")
				sleep(1)
				result = File.exist?("/tmp/#{file_name}")
				File.delete("/tmp/#{file_name}") if result
				result.should == true
			end
			
			it "should return true for Application.test_connection" do
				@app.test_connection?[0].should == true
			end
			
			#parser_file
			#run
			#parse_options
			#consolize
			
		end
	end
end
{'fraction_non_alphanumeric': 0.11300397501419648, 'fraction_numerical': 0.010221465076660987, 'mean_word_length': 2.8056155507559395, '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': '7116241', 'n_tokens_mistral': 775, 'n_tokens_neox': 580, 'n_words': 127}