<commit_before>ENV["RAILS_ENV"] ||= 'test'
require 'spec_helper'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'shoulda/matchers'

Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }

ActiveRecord::Migration.maintain_test_schema!

Monban.test_mode!

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods
  config.include Ivy::Spec::Fixtures
  config.include Monban::Test::ControllerHelpers, type: :controller

  config.fixture_path = "#{::Rails.root}/spec/fixtures"

  config.use_transactional_fixtures = true

  config.infer_spec_type_from_file_location!

  config.after(:suite) do
    FileUtils.rm_rf(Dir["#{ Rails.root }/public/test_files/"])
  end

  config.after :each do
    Monban.test_reset!
  end<commit_msg>clean up all test mails after a test run<commit_after>ENV["RAILS_ENV"] ||= 'test'
require 'spec_helper'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'shoulda/matchers'

Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }

ActiveRecord::Migration.maintain_test_schema!

Monban.test_mode!

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods
  config.include Ivy::Spec::Fixtures
  config.include Monban::Test::ControllerHelpers, type: :controller

  config.fixture_path = "#{::Rails.root}/spec/fixtures"

  config.use_transactional_fixtures = true

  config.infer_spec_type_from_file_location!

  config.after(:suite) do
    FileUtils.rm_rf(Dir["#{ Rails.root }/public/test_files/"])
  end

  config.after :each do
    Monban.test_reset!
    ActionMailer::Base.deliveries.clear
  end
{'fraction_non_alphanumeric': 0.14397120575884823, 'fraction_numerical': 0.0, 'mean_word_length': 5.415384615384616, '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': '1508585', 'n_tokens_mistral': 581, 'n_tokens_neox': 564, 'n_words': 96}