<commit_before>describe "#find" do
  # This is the node structure we'll be using for testing:
  #
  # root
  #   +-- foo
  #   +-- bar
  #         +-- baz
  #

  let!(:root) { Flutterby::Node.new("/") }
  let!(:foo)  { Flutterby::Node.new("foo", parent: root) }
  let!(:bar)  { Flutterby::Node.new("bar", parent: root) }
  let!(:baz)  { Flutterby::Node.new("baz.html", parent: bar) }

  specify "normal singular expressions" do
    expect(root.find("foo")).to eq(foo)
    expect(root.find("bar")).to eq(bar)
  end

  specify "expressions starting with slash" do
    # Just a slash will always return root
    expect(root.find("/")).to eq(root)
    expect(baz.find("/")).to eq(root)<commit_msg>Make find_spec use new "node" spec helper<commit_after>describe "#find" do
  # This is the node structure we'll be using for testing:
  #
  # root
  #   +-- foo
  #   +-- bar
  #         +-- baz
  #

  let!(:root) { node "/" }
  let!(:foo)  { node "foo", parent: root }
  let!(:bar)  { node "bar", parent: root }
  let!(:baz)  { node "baz.html", parent: bar }

  specify "normal singular expressions" do
    expect(root.find("foo")).to eq(foo)
    expect(root.find("bar")).to eq(bar)
  end

  specify "expressions starting with slash" do
    # Just a slash will always return root
    expect(root.find("/")).to eq(root)
    expect(baz.find("/")).to eq(root)
{'fraction_non_alphanumeric': 0.18074074074074073, 'fraction_numerical': 0.0, 'mean_word_length': 3.032835820895522, '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': '4495952', 'n_tokens_mistral': 498, 'n_tokens_neox': 480, 'n_words': 124}