<commit_before>RSpec.configure do |config|

  config.before(:suite) do
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do |test|
    unless test.metadata[:no_database_cleaner]
      DatabaseCleaner.strategy = :transaction
    end
  end

  config.before(:each, :js => true) do |test|
    unless test.metadata[:no_database_cleaner]
      DatabaseCleaner.strategy = :truncation
    end
  end

  config.before(:each) do |test|
    unless test.metadata[:no_database_cleaner]
      DatabaseCleaner.start
    end
  end

  config.after(:each) do |test|
    unless test.metadata[:no_database_cleaner]
      DatabaseCleaner.clean
    end
  end

end<commit_msg>fixed database cleaner problem<commit_after>RSpec.configure do |config|

  config.before(:suite) do
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do |test|
    unless test.metadata[:no_database_cleaner]
      DatabaseCleaner.strategy = :transaction
    end
  end

  config.before(:each, :js => true) do |test|
    unless test.metadata[:no_database_cleaner]
      DatabaseCleaner.strategy = :truncation
    end
  end

  config.before(:each) do |test|
    unless test.metadata[:no_database_cleaner]
      DatabaseCleaner.start
    end
  end

  config.after(:each) do |test|
    if test.metadata[:no_database_cleaner]
      DatabaseCleaner.strategy = :truncation
      DatabaseCleaner.clean      
    else
      DatabaseCleaner.clean
    end
  end

end
{'fraction_non_alphanumeric': 0.09359944941500344, 'fraction_numerical': 0.0, 'mean_word_length': 3.4464831804281344, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5264780', 'n_tokens_mistral': 471, 'n_tokens_neox': 454, 'n_words': 94}