File: math_ml_spec.rb

package info (click to toggle)
ruby-mathml 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 516 kB
  • sloc: ruby: 10,090; makefile: 10
file content (12 lines) | stat: -rw-r--r-- 407 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
require 'math_ml'

describe MathML do
  it 'does not raise error when math_ml.rb is required twice' do
    expect { MathML::LaTeX::Parser.new }.not_to raise_error if require_relative('../lib/math_ml')
  end

  it '.pcstring' do
    expect(MathML.pcstring('<>&"\'').to_s).to eq('&lt;&gt;&amp;&quot;&apos;')
    expect(MathML.pcstring('<tag>&amp;"\'</tag>', true).to_s).to eq('<tag>&amp;"\'</tag>')
  end
end