<commit_before>gem "minitest"
require "minitest/autorun"
require_relative "../generator/utils"

class UtilsTest < MiniTest::Test
  def test_AppendPrologueLink
    path = Array.new
    path.push("First Part")
    link = Utils.append_prologue_link(path)
    assert_equal("first_part/prologue.md", link)
  end

  def test_EmitArticleMarkdownFilename
    filename = Utils.emit_article_markdown_filename("Whether God is one?")
    assert_equal("whether_god_is_one.md", filename)
  end

  def test_EmitArticleMarkdownFilenameStripsCommas
    filename = Utils.emit_article_markdown_filename("Whether, God is, one?")
    assert_equal("whether_god_is_one.md", filename)
  end

  def test_PathFromStack
    stack = Array.new
    stack.push("First Part")
    stack.push("Treatise on the one God")
    path = Utils.path_from_stack(stack)
    assert_equal("first_part/treatise_on_the_one_god", path)
  end

end<commit_msg>Use snake case for these tests.<commit_after>gem "minitest"
require "minitest/autorun"
require_relative "../generator/utils"

class UtilsTest < MiniTest::Test
  def test_append_prologue_link
    path = Array.new
    path.push("First Part")
    link = Utils.append_prologue_link(path)
    assert_equal("first_part/prologue.md", link)
  end

  def test_emit_article_markdown_filename
    filename = Utils.emit_article_markdown_filename("Whether God is one?")
    assert_equal("whether_god_is_one.md", filename)
  end

  def test_emit_article_markdown_filename_strips_commas
    filename = Utils.emit_article_markdown_filename("Whether, God is, one?")
    assert_equal("whether_god_is_one.md", filename)
  end

  def test_path_from_stack
    stack = Array.new
    stack.push("First Part")
    stack.push("Treatise on the one God")
    path = Utils.path_from_stack(stack)
    assert_equal("first_part/treatise_on_the_one_god", path)
  end

end
{'fraction_non_alphanumeric': 0.09253246753246754, 'fraction_numerical': 0.0, 'mean_word_length': 4.832807570977918, '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': '6698145', 'n_tokens_mistral': 641, 'n_tokens_neox': 618, 'n_words': 118}