<commit_before>RSpec.configure do |config|

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

  config.before(:each) do
    DatabaseCleaner.strategy = :transaction
  end

  config.before(:each, clean_with_truncation: true) do
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each, js: true) do
    DatabaseCleaner.strategy = :truncation
  end

  config.after(:all) do
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do |example|
    DatabaseCleaner.start if example.metadata[:database_cleaner] != :all
  end
<commit_msg>Fixed sequence numbers in odk rendering test<commit_after>RSpec.configure do |config|

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

  config.before(:each) do
    DatabaseCleaner.strategy = :transaction
  end

  config.before(:each, clean_with_truncation: true) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.clean

    # Ensure sequences are reset
    FactoryGirl.reload
  end

  config.before(:each, js: true) do
    DatabaseCleaner.strategy = :truncation
  end

  config.after(:all) do
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do |example|
    DatabaseCleaner.start if example.metadata[:database_cleaner] != :all
  end

{'fraction_non_alphanumeric': 0.09699769053117784, 'fraction_numerical': 0.0, 'mean_word_length': 4.2631578947368425, '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': '1664423', 'n_tokens_mistral': 425, 'n_tokens_neox': 401, 'n_words': 87}