Sha256: 288492450b56e2779535659f2818c3613799b7711a3979d1470ba43a501d0b1b

Contents?: true

Size: 585 Bytes

Versions: 1

Compression:

Stored size: 585 Bytes

Contents

require 'spec_helper'

module Hemingway

  describe Parser do

    before do
      @parser = Parser.new
    end

    describe "#special" do

      it 'should escape a special character' do
        html = @parser.parse("War \\& Peace").html
        html.should == "<div class='entry'><p>War & Peace</p></div>"
      end

      it 'should allow for special chars and tags in sequence' do
        html = @parser.parse("War \\& Peace \\textbf{Tolstoy} \\#").html
        html.should == "<div class='entry'><p>War & Peace <strong>Tolstoy</strong> #</p></div>"
      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

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