<commit_before>require 'twistlock_control'

TwistlockControl.configure do |c|
	c.database_name = 'test'
end


Spec::Runner.configure do |config|
	config.before(:all) {
		TwistlockControl.with_connection do |conn|
			RethinkDB::RQL.new().db_drop(TwistlockControl.database_name)
		end
	}
	config.before(:each) {
		TwistlockControl.with_connection do |conn|
			TwistlockControl.database.table_create('applications').run(conn)
		end
	}
	config.after(:all) {
		TwistlockControl.with_connection do |conn|
			RethinkDB::RQL.new().db_drop(TwistlockControl.database_name)
		end
	}
	config.after(:each) {
		TwistlockControl.with_connection do |conn|
			TwistlockControl.database.table_drop('applications').run(conn)
		end
	}
end<commit_msg>speed up tests a bit<commit_after>require 'twistlock_control'

TwistlockControl.configure do |c|
	c.database_name = 'test'
end


Spec::Runner.configure do |config|
	config.before(:all) {
		TwistlockControl.with_connection do |conn|
			RethinkDB::RQL.new().db_drop(TwistlockControl.database_name)
			TwistlockControl.database.table_create('applications').run(conn)
		end
	}
	config.before(:each) {
		TwistlockControl.with_connection do |conn|
			TwistlockControl.database.table('applications').delete.run(conn)
		end
	}
	config.after(:all) {
		TwistlockControl.with_connection do |conn|
			RethinkDB::RQL.new().db_drop(TwistlockControl.database_name)
		end
	}
	config.after(:each) {
	}
end
{'fraction_non_alphanumeric': 0.12411847672778561, 'fraction_numerical': 0.0, 'mean_word_length': 5.725118483412322, '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': '615484', 'n_tokens_mistral': 540, 'n_tokens_neox': 507, 'n_words': 71}