<commit_before>if defined?(RUBY_ENGINE) and (RUBY_ENGINE == 'ruby') and (RUBY_VERSION >= '1.9')
  require 'simplecov'
  SimpleCov.start
end
$:.push(File.join(File.dirname(__FILE__),'..','lib'))
require 'nokogiri'
require 'equivalent-xml'

describe EquivalentXml do

  it "should consider a document equivalent to itself" do
    doc1 = Nokogiri::XML("<doc xmlns='foo:bar'><first>foo  bar baz</first><second>things</second></doc>")
    doc1.should be_equivalent_to(doc1)
  end
  
  it "should compare non-XML content based on its string representation" do
    nil.should be_equivalent_to(nil)<commit_msg>Include rspec/matchers to ensure that Rspec::Matchers is defined<commit_after>if defined?(RUBY_ENGINE) and (RUBY_ENGINE == 'ruby') and (RUBY_VERSION >= '1.9')
  require 'simplecov'
  SimpleCov.start
end
$:.push(File.join(File.dirname(__FILE__),'..','lib'))
require 'nokogiri'
require 'rspec/matchers'
require 'equivalent-xml'

describe EquivalentXml do

  it "should consider a document equivalent to itself" do
    doc1 = Nokogiri::XML("<doc xmlns='foo:bar'><first>foo  bar baz</first><second>things</second></doc>")
    doc1.should be_equivalent_to(doc1)
  end
  
  it "should compare non-XML content based on its string representation" do
    nil.should be_equivalent_to(nil)
{'fraction_non_alphanumeric': 0.134375, 'fraction_numerical': 0.0078125, 'mean_word_length': 5.405, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2732530', 'n_tokens_mistral': 451, 'n_tokens_neox': 427, 'n_words': 108}