<commit_before># require 'coveralls'
require 'codeclimate-test-reporter'

# Coveralls.wear!
CodeClimate::TestReporter.start

require 'serinette'

# Custom Matchers
d = File.expand_path(File.join(File.dirname(__FILE__), 'support', '**', '*.rb'))
Dir[d].each { |f| require f }<commit_msg>Add Logic for Sending Stdout to Test Log File<commit_after># require 'coveralls'
require 'codeclimate-test-reporter'

# Coveralls.wear!
CodeClimate::TestReporter.start

require 'serinette'

# Custom Matchers
d = File.expand_path(File.join(File.dirname(__FILE__), 'support', '**', '*.rb'))
Dir[d].each { |f| require f }

# Ensures that stdout is directed into dev/null.txt during tests
RSpec.configure do |config|
  original_stderr = $stderr
  original_stdout = $stdout

  config.before(:all) do
    dev = File.join(File.dirname(__FILE__), 'dev', 'log.txt')
    $stderr = File.new(dev, 'w')
    $stdout = File.new(dev, 'w')
  end

  config.after(:all) do
    $stderr = original_stderr
    $stdout = original_stdout
  end
end
{'fraction_non_alphanumeric': 0.14866204162537167, 'fraction_numerical': 0.0, 'mean_word_length': 4.906432748538012, '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': '5768332', 'n_tokens_mistral': 354, 'n_tokens_neox': 349, 'n_words': 83}