<commit_before>require 'test_helper'

class TestCache < Minitest::Test
  include PictureTag
  include TestHelper

  def setup
    PictureTag.stubs(:site).returns(build_site_stub)

    @tested = Cache::Source.new('img.jpg')
  end
<commit_msg>Remove cache files during unit test teardown<commit_after>require 'test_helper'

# Source cache and generated cache don't differ in functionality, just
# information format. These unit tests give sufficient coverage for both, as well
# as the Cache::Base module.
class TestCache < Minitest::Test
  include PictureTag
  include TestHelper

  def setup
    PictureTag.stubs(:site).returns(build_site_stub)

    @tested = Cache::Source.new('img.jpg')
  end

  def teardown
    FileUtils.rm_rf '/tmp/jpt/'
  end

{'fraction_non_alphanumeric': 0.08811748998664887, 'fraction_numerical': 0.0, 'mean_word_length': 4.514705882352941, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2235093', 'n_tokens_mistral': 231, 'n_tokens_neox': 224, 'n_words': 67}