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 == "

War & Peace

" end it 'should allow for special chars and tags in sequence' do html = @parser.parse("War \\& Peace \\textbf{Tolstoy} \\#").html html.should == "

War & Peace Tolstoy #

" end end end end