test/parser_spec.rb in asciimath-1.0.0.preview.1 vs test/parser_spec.rb in asciimath-1.0.0
- old
+ new
@@ -42,20 +42,20 @@
'<math><mrow><mo>(</mo><mtable><mtr><mtd><msub><mi>a</mi><mn>11</mn></msub></mtd><mtd><mo>⋯</mo></mtd><mtd><msub><mi>a</mi><mrow><mn>1</mn><mi>n</mi></mrow></msub></mtd></mtr><mtr><mtd><mo>⋮</mo></mtd><mtd><mo>⋱</mo></mtd><mtd><mo>⋮</mo></mtd></mtr><mtr><mtd><msub><mi>a</mi><mrow><mi>m</mi><mn>1</mn></mrow></msub></mtd><mtd><mo>⋯</mo></mtd><mtd><msub><mi>a</mi><mrow><mi>m</mi><mi>n</mi></mrow></msub></mtd></mtr></mtable><mo>)</mo></mrow></math>',
'sum_(k=1)^n k = 1+2+ cdots +n=(n(n+1))/2' =>
'<math><munderover><mo>∑</mo><mrow><mi>k</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover><mi>k</mi><mo>=</mo><mn>1</mn><mo>+</mo><mn>2</mn><mo>+</mo><mo>⋯</mo><mo>+</mo><mi>n</mi><mo>=</mo><mfrac><mrow><mi>n</mi><mrow><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow></mrow><mn>2</mn></mfrac></math>',
}
-module AsciimathHelper
+module AsciiMathHelper
def expect_mathml(asciimath, mathml)
- expect(Asciimath.parse(asciimath).to_mathml).to eq(mathml)
+ expect(AsciiMath.parse(asciimath).to_mathml).to eq(mathml)
end
end
RSpec.configure do |c|
- c.include AsciimathHelper
+ c.include AsciiMathHelper
end
-describe "Asciimath::MathMLBuilder" do
+describe "AsciiMath::MathMLBuilder" do
TEST_CASES.each_pair do |asciimath, mathml|
it "should produce identical output to asciimathml.js for '#{asciimath}'" do
expect_mathml(asciimath, mathml)
end
end
\ No newline at end of file