<commit_before>ENV['RACK_ENV'] = 'test'

require 'webmock/rspec'
require 'rack/test'
require 'gris/rspec_extensions/response_helpers'

require File.expand_path('../../config/application', __FILE__)

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

RSpec.configure do |config|
  config.include Gris::RspecExtensions::ResponseHelpers
  config.mock_with :rspec
  config.expect_with :rspec

  config.before(:suite) do
    ActiveRecord::Migration.maintain_test_schema!
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:truncation)
  end

  config.after(:each) do |_example|
    DatabaseCleaner.clean
  end
end<commit_msg>fix spec_helper generator for DatabaseCleaner<commit_after>ENV['RACK_ENV'] = 'test'

require 'webmock/rspec'
require 'rack/test'
require 'gris/rspec_extensions/response_helpers'

require File.expand_path('../../config/application', __FILE__)

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

RSpec.configure do |config|
  config.include Gris::RspecExtensions::ResponseHelpers
  config.mock_with :rspec
  config.expect_with :rspec

  config.before(:suite) do
    ActiveRecord::Migration.maintain_test_schema!
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do
    DatabaseCleaner.clean
  end
end
{'fraction_non_alphanumeric': 0.11787564766839378, 'fraction_numerical': 0.0, 'mean_word_length': 5.082677165354331, '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': '6538493', 'n_tokens_mistral': 493, 'n_tokens_neox': 486, 'n_words': 106}