<commit_before>if ENV['COVERAGE']
  require 'simplecov'
  SimpleCov.start 'rails'
end

require 'securerandom'

ENV["RAILS_ENV"] = "test"
require File.expand_path("../../config/environment", __FILE__)
require 'rails/test_help'
require 'minitest/rails'
require 'wrong/adapters/minitest'

require 'minitest/rails/capybara'
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new app,
    js_errors: true,
    url_whitelist: %w(://127.0.0.1:*),
    extensions: %w(rangy-1.3.0/rangy-core.js rangy-1.3.0/rangy-textrange.js).map {|p| File.expand_path("../helpers/phantomjs/#{p}", __FILE__)}
end
Capybara.javascript_driver = :poltergeist
Capybara.default_max_wait_time = 10.seconds

require 'helpers/capybara'

require 'database_cleaner'

require 'minitest/reporters'
Minitest::Reporters.use!


class ActiveSupport::TestCase
  self.use_transactional_fixtures = false
  fixtures :all

  # Disable sunspot for most tests
  sunspot_test_session = Sunspot.session
  sunspot_stub_session = Sunspot::Rails::StubSessionProxy.new(sunspot_test_session)<commit_msg>Load seeds.rb in test_helper.<commit_after>if ENV['COVERAGE']
  require 'simplecov'
  SimpleCov.start 'rails'
end

require 'securerandom'

ENV["RAILS_ENV"] = "test"
require File.expand_path("../../config/environment", __FILE__)
require 'rails/test_help'
require 'minitest/rails'
require 'wrong/adapters/minitest'

require 'minitest/rails/capybara'
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new app,
    js_errors: true,
    url_whitelist: %w(://127.0.0.1:*),
    extensions: %w(rangy-1.3.0/rangy-core.js rangy-1.3.0/rangy-textrange.js).map {|p| File.expand_path("../helpers/phantomjs/#{p}", __FILE__)}
end
Capybara.javascript_driver = :poltergeist
Capybara.default_max_wait_time = 10.seconds

require 'helpers/capybara'

require 'database_cleaner'

require 'minitest/reporters'
Minitest::Reporters.use!

load "#{Rails.root}/db/seeds.rb"

class ActiveSupport::TestCase
  self.use_transactional_fixtures = false
  fixtures :all

  # Disable sunspot for most tests
  sunspot_test_session = Sunspot.session
  sunspot_stub_session = Sunspot::Rails::StubSessionProxy.new(sunspot_test_session)
{'fraction_non_alphanumeric': 0.133244798583444, 'fraction_numerical': 0.01239486498450642, 'mean_word_length': 5.766467065868263, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5353897', 'n_tokens_mistral': 868, 'n_tokens_neox': 837, 'n_words': 138}