Sha256: 9ac6bf9a29285288548648cbfba58363b1bdbf9d31650360f79402b1cf071c6c

Contents?: true

Size: 1.06 KB

Versions: 26

Compression:

Stored size: 1.06 KB

Contents

# encoding=utf-8
require 'spec_helper'

describe 'Polytexnic::Pipeline#to_html' do

  subject(:processed_text) { Polytexnic::Pipeline.new(polytex).to_html }

  describe "code listings" do
    let(:polytex) do <<-'EOS'
      \chapter{Foo bar}

      \begin{aside}
      \heading{Lorem ipsum.}
      \label{aside:lorem}

      lorem ipsum

      dolor sit amet

      \end{aside}

      Box~\ref{aside:lorem}
      EOS
    end

    it do
      should resemble <<-'EOS'
        <div id="cid1" data-tralics-id="cid1" class="chapter" data-number="1"><h1><a href="#cid1" class="heading"><span class="number">Chapter 1 </span>Foo bar</a></h1>
        <div class="aside" id="aside-lorem" data-tralics-id="uid1" data-number="1.1">
          <div class="heading">
            <span class="number">Box 1.1.</span>
            <span class="description">Lorem ipsum.</span>
          </div>
          <p>lorem ipsum</p>
          <p>dolor sit amet</p>
        </div>
        <p><a href="#aside-lorem" class="hyperref">Box <span class="ref">1.1</span></a></p>
        </div>
      EOS
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
polytexnic-0.8.4 spec/to_html/asides_spec.rb
polytexnic-0.8.3 spec/to_html/asides_spec.rb
polytexnic-0.8.2 spec/to_html/asides_spec.rb
polytexnic-0.8.1 spec/to_html/asides_spec.rb
polytexnic-0.8.0 spec/to_html/asides_spec.rb
polytexnic-0.7.7 spec/to_html/asides_spec.rb
polytexnic-0.7.6 spec/to_html/asides_spec.rb
polytexnic-0.7.5 spec/to_html/asides_spec.rb
polytexnic-0.7.4 spec/to_html/asides_spec.rb
polytexnic-0.7.3 spec/to_html/asides_spec.rb
polytexnic-0.7.2 spec/to_html/asides_spec.rb
polytexnic-0.7.1 spec/to_html/asides_spec.rb
polytexnic-0.7.0 spec/to_html/asides_spec.rb
polytexnic-0.6.11 spec/to_html/asides_spec.rb
polytexnic-0.6.10 spec/to_html/asides_spec.rb
polytexnic-0.6.9 spec/to_html/asides_spec.rb
polytexnic-0.6.8 spec/to_html/asides_spec.rb
polytexnic-0.6.7 spec/to_html/asides_spec.rb
polytexnic-0.6.6 spec/to_html/asides_spec.rb
polytexnic-0.6.5 spec/to_html/asides_spec.rb