Sha256: 57490cc1e4de7b0450f03fb5eddf83764bd28f712c2e9b76c0e61fd4760fec08

Contents?: true

Size: 769 Bytes

Versions: 3

Compression:

Stored size: 769 Bytes

Contents

require 'spec_helper'

module Hemingway

  describe Parser do

    before do
      @parser = Parser.new
    end

    describe "#verbatim" do

      it 'allows me to instantiate pre-formatted text' do
        html = @parser.parse("\\begin{verbatim} don't  we  \n \n all wish \n \n   for a little sleep? \\end{verbatim}").html
        html.should == "<div class='entry'><p><pre>don't  we  \n \n all wish \n \n   for a little sleep? </pre></p></div>"
      end

      it 'allows me to write tex markup that isnt parses' do
        html = @parser.parse("\\begin{verbatim} Emphasized text uses the \\emph{} tag. \\end{verbatim}").html
        html.should == "<div class='entry'><p><pre>Emphasized text uses the \\emph{} tag. </pre></p></div>"
      end

    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hemingway-1.0.0 spec/nodes/block/verbatim_spec.rb
hemingway-0.0.3 spec/nodes/block/verbatim_spec.rb
hemingway-0.0.2 spec/nodes/block/verbatim_spec.rb