spec/nodes/math_spec.rb in hemingway-0.0.2 vs spec/nodes/math_spec.rb in hemingway-0.0.3
- old
+ new
@@ -22,9 +22,19 @@
it 'should escape text properly into a math symbol' do
html = @parser.parse("hello $\\Delta$").html
html.should == "<div class='entry'><p>hello Δ</p></div>"
end
+ it 'should allow me to exponentiate text' do
+ html = @parser.parse("December 7$^{th}$").html
+ html.should == "<div class='entry'><p>December 7<sup>th</sup></p></div>"
+ end
+
+ it 'should allow me to make a degree sign' do
+ html = @parser.parse("25 $^{\\circ}$ celcius").html
+ html.should == "<div class='entry'><p>25 ° celcius</p></div>"
+ end
+
end
end
end
\ No newline at end of file