<commit_before>if ENV['COVERAGE']
  require 'simplecov'
  require 'simplecov-console'
  require 'coveralls'

  SimpleCov.minimum_coverage 100

  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
    SimpleCov::Formatter::HTMLFormatter,
    SimpleCov::Formatter::Console,
    Coveralls::SimpleCov::Formatter,
  ]

  SimpleCov.start 'rails'
end

ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)

require 'rspec/rails'
require 'rspec/autorun'
require 'shoulda/matchers'

Dir[Rails.root.join('spec/support/**/*.rb')].each {|f| require f}

RSpec.configure do |config|
  config.before :all do
    CouchPotato.couchrest_database.create!
  end

  config.before do
    if CouchPotato.couchrest_database.info['update_seq'] > 0
      CouchPotato.couchrest_database.recreate!
    end
  end
end
<commit_msg>Fixed deprecation warnings in rspec<commit_after>if ENV['COVERAGE']
  require 'simplecov'
  require 'simplecov-console'
  require 'coveralls'

  SimpleCov.minimum_coverage 100

  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
    SimpleCov::Formatter::HTMLFormatter,
    SimpleCov::Formatter::Console,
    Coveralls::SimpleCov::Formatter,
  ]

  SimpleCov.start 'rails'
end

ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)

require 'rspec/rails'
require 'rspec/autorun'
require 'shoulda/matchers'

Dir[Rails.root.join('spec/support/**/*.rb')].each {|f| require f}

RSpec.configure do |config|
  config.infer_spec_type_from_file_location!

  config.before :all do
    CouchPotato.couchrest_database.create!
  end

  config.before do
    if CouchPotato.couchrest_database.info['update_seq'] > 0
      CouchPotato.couchrest_database.recreate!
    end
  end
end

{'fraction_non_alphanumeric': 0.12727272727272726, 'fraction_numerical': 0.004545454545454545, 'mean_word_length': 4.87, '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': '3471186', 'n_tokens_mistral': 634, 'n_tokens_neox': 602, 'n_words': 105}