<commit_before>require 'simplecov'
require 'simplecov-rcov'
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
SimpleCov.minimum_coverage 100

# Minimal auto-load for quicker specs. This avoids loading the whole of Rails
# solely for dependency resolution.
autoload :ActiveModel, 'active_model'
autoload :Virtus, 'virtus'
require 'active_support/dependencies'
Dir[File.expand_path('../../{lib,app/**/*}', __FILE__)].each do |path|
  next unless File.directory?(path)
  ActiveSupport::Dependencies.autoload_paths << path
end

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.filter_run :focus
  config.run_all_when_everything_filtered = true

  config.example_status_persistence_file_path = "spec/examples.txt"

  config.disable_monkey_patching!

  if config.files_to_run.one?
    config.default_formatter = 'doc'
  else
    SimpleCov.start 'rails' do<commit_msg>Load all of ActiveSupport in specs<commit_after>require 'simplecov'
require 'simplecov-rcov'
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
SimpleCov.minimum_coverage 100

# Minimal auto-load for quicker specs. This avoids loading the whole of Rails
# solely for dependency resolution.
autoload :ActiveModel, 'active_model'
autoload :Virtus, 'virtus'
require 'active_support'
Dir[File.expand_path('../../{lib,app/**/*}', __FILE__)].each do |path|
  next unless File.directory?(path)
  ActiveSupport::Dependencies.autoload_paths << path
end

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.filter_run :focus
  config.run_all_when_everything_filtered = true

  config.example_status_persistence_file_path = "spec/examples.txt"

  config.disable_monkey_patching!

  if config.files_to_run.one?
    config.default_formatter = 'doc'
  else
    SimpleCov.start 'rails' do
{'fraction_non_alphanumeric': 0.0944186046511628, 'fraction_numerical': 0.0027906976744186047, 'mean_word_length': 5.498489425981873, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3471217', 'n_tokens_mistral': 723, 'n_tokens_neox': 686, 'n_words': 152}