Sha256: 65df93c2166eed5aa96e921e46d744b8879ecc4f1cf6838852c66acf5ce131ab

Contents?: true

Size: 579 Bytes

Versions: 2

Compression:

Stored size: 579 Bytes

Contents

require "test_helper"

class Mathematical::MathMLTest < Test::Unit::TestCase

  def test_it_returns_mathml
    string = '''
    $$
\begin{pmatrix}
     1 & a_1 & a_1^2 & \cdots & a_1^n \\\\
     1 & a_2 & a_2^2 & \cdots & a_2^n \\\\
     \vdots  & \vdots& \vdots & \ddots & \vdots \\\\
     1 & a_m & a_m^2 & \cdots & a_m^n
     \end{pmatrix}
$$
'''
    render = Mathematical.new({:format => :mathml})
    mathml = render.render(string)[:data]

    assert_match %r{<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'><semantics><mrow><mrow><mo>\(}, mathml
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mathematical-1.1.1 test/mathematical/mathml_test.rb
mathematical-1.1.0 test/mathematical/mathml_test.rb