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

require 'rspec'
require 'rack/test'
require 'byebug'

# Application code
require File.expand_path '../config/environment.rb', __dir__

# Support files
require File.expand_path './support/rspec_mixin.rb', __dir__
require File.expand_path './support/json_helpers.rb', __dir__

RSpec.configure do |config|
  # Disable usage of monkey patch version of describe
  # by preventing global injection of RSpec's DSL
  config.expose_dsl_globally = false
  config.include RSpecMixin, type: :request
  config.include JsonHelpers, type: :request
end
<commit_msg>reset after specs to not share state between specs<commit_after>ENV['RACK_ENV'] = 'test'

require 'rspec'
require 'rack/test'
require 'byebug'

# Application code
require File.expand_path '../config/environment.rb', __dir__

# Support files
require File.expand_path './support/rspec_mixin.rb', __dir__
require File.expand_path './support/json_helpers.rb', __dir__

RSpec.configure do |config|
  # Disable usage of monkey patch version of describe
  # by preventing global injection of RSpec's DSL
  config.expose_dsl_globally = false
  config.include RSpecMixin, type: :request
  config.include JsonHelpers, type: :request

  config.around(:each) do |example|
    RepositoryRegister.register(:short_code, InMemoryRepository.new)
    example.run
  end
end

{'fraction_non_alphanumeric': 0.09888475836431226, 'fraction_numerical': 0.0, 'mean_word_length': 5.090497737556561, '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': '7515599', 'n_tokens_mistral': 424, 'n_tokens_neox': 417, 'n_words': 121}