<commit_before>require 'simplecov'
require 'stringio'

SimpleCov.start do
  add_filter 'spec/test_default_app'
  add_filter 'spec/test_custom_app'
end

if ENV['CI'] == 'true'
  require 'codecov'
  SimpleCov.formatter = SimpleCov::Formatter::Codecov
end

TEST_DEFAULT_APP_DIR = File.absolute_path(File.join(File.dirname(__FILE__), 'test_default_app'))
TEST_CUSTOM_APP_DIR = File.absolute_path(File.join(File.dirname(__FILE__), 'test_custom_app'))

require 'racket'
require 'rack/test'
require 'bacon'

Dir.chdir(TEST_DEFAULT_APP_DIR) { require_relative '_default.rb' }

Racket::Application.class_eval { @current = nil }

Dir.chdir(TEST_CUSTOM_APP_DIR) { require_relative '_custom.rb' }<commit_msg>Don't do coverage on spec folder<commit_after>require 'simplecov'
require 'stringio'

SimpleCov.start do
  add_filter 'spec'
  if ENV['CI'] == 'true'
    require 'codecov'
    formatter = SimpleCov::Formatter::Codecov
  end
end

TEST_DEFAULT_APP_DIR = File.absolute_path(File.join(File.dirname(__FILE__), 'test_default_app'))
TEST_CUSTOM_APP_DIR = File.absolute_path(File.join(File.dirname(__FILE__), 'test_custom_app'))

require 'racket'
require 'rack/test'
require 'bacon'

Dir.chdir(TEST_DEFAULT_APP_DIR) { require_relative '_default.rb' }

Racket::Application.class_eval { @current = nil }

Dir.chdir(TEST_CUSTOM_APP_DIR) { require_relative '_custom.rb' }
{'fraction_non_alphanumeric': 0.12398523985239852, 'fraction_numerical': 0.0, 'mean_word_length': 7.071428571428571, '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': '6149891', 'n_tokens_mistral': 491, 'n_tokens_neox': 485, 'n_words': 83}