<commit_before>require "spec_helper"

describe Dragon::Parser do
  let(:parser) { described_class.new }

  describe "#space" do
    it "parses space" do
      expect(parse(:space, "\s")).to eq("\s")
    end

    it "parses tab" do
      expect(parse(:space, "\t")).to eq("\t")
    end
  end

  describe "#newline" do
    it "parses windows return" do
      expect(parse(:newline, "\r")).to eq("\r")
    end

    it "parses unix return" do
      expect(parse(:newline, "\n")).to eq("\n")
    end
  end

  describe "#white_space" do
    it "parses multiple spaces" do
      expect(parse(:white_space, "\s\s")).to eq("\s\s")
    end

    it "parses multiple returns" do
      expect(parse(:white_space, "\r\r")).to eq("\r\r")
    end
  end

  describe "#upper_letter" do
    it "parses A" do
      expect(parse(:upper_letter, "A")).to eq("A")<commit_msg>Updating tests to match new logic.<commit_after>require "spec_helper"

describe Dragon::Parser do
  let(:parser) { described_class.new }

  describe "#space" do
    it "parses space" do
      expect(parse(:space, "\s")).to eq("\s")
    end

    it "parses tab" do
      expect(parse(:space, "\t")).to eq("\t")
    end
  end

  describe "#newline" do
    it "parses windows return" do
      expect(parse(:newline, "\r")).to eq("\r")
    end

    it "parses unix return" do
      expect(parse(:newline, "\n")).to eq("\n")
    end
  end

  describe "#white_space" do
    it "parses single spaces" do
      expect(parse(:white_space, "\s")).to eq("\s")
    end

    it "parses multiple spaces" do
      expect(parse(:white_space, "\s\s")).to eq("\s\s")
    end

    it "parses single tabs" do
      expect(parse(:white_space, "\t")).to eq("\t")
    end

    it "parses multiple spaces" do
      expect(parse(:white_space, "\t\t")).to eq("\t\t")
    end

    it "parses mixed spaces" do
      expect(parse(:white_space, "\s\t")).to eq("\s\t")
    end
  end

  describe "#upper_letter" do
    it "parses A" do
      expect(parse(:upper_letter, "A")).to eq("A")
{'fraction_non_alphanumeric': 0.17256857855361596, 'fraction_numerical': 0.0, 'mean_word_length': 2.7286245353159853, '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': '1522849', 'n_tokens_mistral': 721, 'n_tokens_neox': 700, 'n_words': 193}