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

require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start

require 'rspec'

# load the application
require File.expand_path('../../app', __FILE__)
require 'rack/test'

set :environment, :test
set :run, false
set :raise_errors, true
set :logging, false

def app
  Sinatra::Application
end

# load in the support directory
Dir['support/**/*.rb'].each { |f| require File.expand_path f, __dir__ }

# bring up the migrations
ActiveRecord::Migrator.up 'db/migrate'

RSpec.configure do |config|
  config.include Rack::Test::Methods

  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true<commit_msg>Improves the support directory loading.<commit_after>ENV['RACK_ENV'] ||= 'test'

require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start

require 'rspec'

# load the application
require File.expand_path('../../app', __FILE__)
require 'rack/test'

set :environment, :test
set :run, false
set :raise_errors, true
set :logging, false

def app
  Sinatra::Application
end

# load in the support directory
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

# bring up the migrations
ActiveRecord::Migrator.up 'db/migrate'

RSpec.configure do |config|
  config.include Rack::Test::Methods

  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
{'fraction_non_alphanumeric': 0.11851851851851852, 'fraction_numerical': 0.0, 'mean_word_length': 5.356862745098039, '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': '3263663', 'n_tokens_mistral': 539, 'n_tokens_neox': 537, 'n_words': 133}