Sha256: c0c9d663c64d2c2d8d2cc04aa774e4902219cb2d3ecda0f123a2bc9a8c9a0afe

Contents?: true

Size: 720 Bytes

Versions: 1

Compression:

Stored size: 720 Bytes

Contents

require 'spec_helper'

module Hemingway

  describe Parser do

    before do
      @parser = Parser.new
    end

    describe "#math" do
      it 'should parse out a math symbol' do
        html = @parser.parse("$\\Delta$").html
        html.should == "<div class='entry'><p>&Delta;</p></div>"
      end

      it 'should allow me to nest math symbols in a tag' do
        html = @parser.parse("\\emph{$\\Delta$}").html
        html.should == "<div class='entry'><p><em>&Delta;</em></p></div>"
      end

      it 'should escape text properly into a math symbol' do
        html = @parser.parse("hello $\\Delta$").html
        html.should == "<div class='entry'><p>hello &Delta;</p></div>"
      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hemingway-0.0.2 spec/nodes/math_spec.rb