<commit_before>require 'simplecov'
require 'coveralls'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]
SimpleCov.start 'rails'

require 'cucumber/rails'
require 'cucumber/rspec/doubles'

#Load seed data
require Rails.root.join('db', 'seeds')
#Set server dir to rails tmp directory so we can write reservation.cfg for tests
Server.update_all(:path => Rails.root.join('tmp').to_s)

include Devise::TestHelpers

Capybara.default_selector = :css

ActionController::Base.allow_rescue = false

begin
  DatabaseCleaner.strategy = :transaction
rescue NameError
  raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
end

Cucumber::Rails::Database.javascript_strategy = :truncation<commit_msg>clean up test database after cucumber end<commit_after>require 'simplecov'
require 'coveralls'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]
SimpleCov.start 'rails'

require 'cucumber/rails'
require 'cucumber/rspec/doubles'

#Load seed data
require Rails.root.join('db', 'seeds')
#Set server dir to rails tmp directory so we can write reservation.cfg for tests
Server.update_all(:path => Rails.root.join('tmp').to_s)

at_exit do
  Server.delete_all
end

include Devise::TestHelpers

Capybara.default_selector = :css

ActionController::Base.allow_rescue = false

begin
  DatabaseCleaner.strategy = :transaction
rescue NameError
  raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
end

Cucumber::Rails::Database.javascript_strategy = :truncation
{'fraction_non_alphanumeric': 0.09917840375586855, 'fraction_numerical': 0.0, 'mean_word_length': 6.380952380952381, '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': '2190705', 'n_tokens_mistral': 548, 'n_tokens_neox': 530, 'n_words': 147}