<commit_before>require "rubygems"
require "contest"
require "hpricot"

ROOT = File.expand_path(File.join(File.dirname(__FILE__), ".."))

$:.unshift ROOT

require "test/commands"

class Test::Unit::TestCase
  include Test::Commands

  def root(*args)
    File.join(ROOT, *args)
  end

  def monk(args = nil)
    sh("env MONK_HOME=#{File.join(ROOT, "test", "tmp")} ruby -rubygems #{root "bin/monk"} #{args}")
  end
end<commit_msg>Reset the .monk config after each test.<commit_after>require "rubygems"
require "contest"
require "hpricot"

ROOT = File.expand_path(File.join(File.dirname(__FILE__), ".."))

$:.unshift ROOT

require "test/commands"

class Test::Unit::TestCase
  include Test::Commands

  def root(*args)
    File.join(ROOT, *args)
  end

  def setup
    FileUtils.rm(File.join(ROOT, "test", "tmp", ".monk"))
  end

  def monk(args = nil)
    sh("env MONK_HOME=#{File.join(ROOT, "test", "tmp")} ruby -rubygems #{root "bin/monk"} #{args}")
  end
end
{'fraction_non_alphanumeric': 0.17309697601668406, 'fraction_numerical': 0.0, 'mean_word_length': 4.5813953488372094, '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': '1415573', 'n_tokens_mistral': 362, 'n_tokens_neox': 354, 'n_words': 82}