<commit_before>require_relative '../lib/inline_svg/id_generator'

describe InlineSvg::IdGenerator do
  it "generates a hexencoded ID based on a salt" do
    expect(InlineSvg::IdGenerator.generate("some-base", "some-salt")).
      to eq("ksiuuy1jduycacqpoj5smn2kyt9iv02")
  end
end
<commit_msg>Fail: should generate IDs with randomness<commit_after>require_relative '../lib/inline_svg/id_generator'

describe InlineSvg::IdGenerator do
  it "generates a hexencoded ID based on a salt and a random value" do
    randomizer = -> { "some-random-value" }

    expect(InlineSvg::IdGenerator.generate("some-base", "some-salt", randomness: randomizer)).
      to eq("t2c17mkqnvopy36iccxspura7wnreqf")
  end
end

{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.017094017094017096, 'mean_word_length': 5.060344827586207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3363616', 'n_tokens_mistral': 246, 'n_tokens_neox': 238, 'n_words': 55}