<commit_before>require 'spec_helper'

describe LLT::Token::Punctuation do
  describe "#initialize", :focus do
    it "normalizes escaped xml characters" do
      punct = LLT::Token::Punctuation.new('&amp;')
      punct.to_s.should == '&'
    end
  end

  describe "#as_xml" do
    it "overrides LLT::Core::Containable#as_xml to use xml encodings" do
      punct = LLT::Token::Punctuation.new('&')
      punct.as_xml.should == "&amp;"<commit_msg>Unfocus.<commit_after>require 'spec_helper'

describe LLT::Token::Punctuation do
  describe "#initialize" do
    it "normalizes escaped xml characters" do
      punct = LLT::Token::Punctuation.new('&amp;')
      punct.to_s.should == '&'
    end
  end

  describe "#as_xml" do
    it "overrides LLT::Core::Containable#as_xml to use xml encodings" do
      punct = LLT::Token::Punctuation.new('&')
      punct.as_xml.should == "&amp;"
{'fraction_non_alphanumeric': 0.14481185860889395, 'fraction_numerical': 0.0, 'mean_word_length': 3.905027932960894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '4026903', 'n_tokens_mistral': 304, 'n_tokens_neox': 309, 'n_words': 68}