<commit_before># This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require "pundit/rspec"

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }

# Checks for pending migrations before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods
  config.include APIRequestHelpers, type: :controller
  config.include APIResponseHelpers, type: :controller

  config.use_transactional_fixtures = true

  config.before(:suite) do
    begin
      DatabaseCleaner.strategy = :transaction
    ensure
      DatabaseCleaner.clean_with(:truncation)
    end
  end
<commit_msg>fix failing specs for paper trail when running under spring<commit_after># This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require "pundit/rspec"
require 'paper_trail/frameworks/rspec'

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }

# Checks for pending migrations before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods
  config.include APIRequestHelpers, type: :controller
  config.include APIResponseHelpers, type: :controller

  config.use_transactional_fixtures = true

  config.before(:suite) do
    begin
      DatabaseCleaner.strategy = :transaction
    ensure
      DatabaseCleaner.clean_with(:truncation)
    end
  end

{'fraction_non_alphanumeric': 0.10192973775358734, 'fraction_numerical': 0.0, 'mean_word_length': 4.810344827586207, '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': '2599077', 'n_tokens_mistral': 603, 'n_tokens_neox': 591, 'n_words': 181}