require "spec_helper" require "nokogiri" RSpec.describe Omml2Mathml do it "has a version number" do expect(Omml2Mathml::VERSION).not_to be nil end it "processes a document" do output = Omml2Mathml.convert("spec/test.html").sub(/<\?xml[^>]+>/, "").sub(/]+>/, "") html = <<~"OUTPUT"

This standard applies to the elliptic curves over the finite field F p  (the prime p > 2 191 ).

OUTPUT if Gem::Version.new(Nokogiri::VERSION) < Gem::Version.new("1.11") output.gsub!("\n>", "") output.gsub!("http://www.w3.org/TR/REC-html40", "http://www.w3.org/1999/xhtml") else output.gsub!(%r{ xml:lang="[\w-]+"}, "") end expect(html).to be_equivalent_to output end end