Sha256: e290bd0d88731eab6cbc82cd5b83f18fb078db86f7dbf7f23a5eaa3065afa6b1

Contents?: true

Size: 675 Bytes

Versions: 113

Compression:

Stored size: 675 Bytes

Contents

# encoding=utf-8
require 'spec_helper'

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

  describe 'equation \ref' do

      let(:equation) do <<-'EOS'
        \chapter{Equation test}

        \[ x^2 \]

        \begin{equation}
        \label{eq:foobar}
        x
        \end{equation}

       EOS
    end

    context 'with \ref{eq:foobar}' do
      let(:polytex) { equation + '\ref{eq:foobar}' }
      it { should include '1.1' }
    end

    context 'with \eqref{eq:foobar}' do
      let(:polytex) { equation + '\eqref{eq:foobar}' }
      it { should include '(<span class="ref">1.1</span>)' }
    end
  end
end

Version data entries

113 entries across 113 versions & 1 rubygems

Version Path
polytexnic-1.5.10 spec/to_html/eqref_spec.rb
polytexnic-1.5.9 spec/to_html/eqref_spec.rb
polytexnic-1.5.8 spec/to_html/eqref_spec.rb
polytexnic-1.5.7 spec/to_html/eqref_spec.rb
polytexnic-1.5.6 spec/to_html/eqref_spec.rb
polytexnic-1.5.5 spec/to_html/eqref_spec.rb
polytexnic-1.5.4 spec/to_html/eqref_spec.rb
polytexnic-1.5.3 spec/to_html/eqref_spec.rb
polytexnic-1.5.2 spec/to_html/eqref_spec.rb
polytexnic-1.5.1 spec/to_html/eqref_spec.rb
polytexnic-1.5.0 spec/to_html/eqref_spec.rb
polytexnic-1.4.1 spec/to_html/eqref_spec.rb
polytexnic-1.4.0 spec/to_html/eqref_spec.rb
polytexnic-1.3.5 spec/to_html/eqref_spec.rb
polytexnic-1.3.4 spec/to_html/eqref_spec.rb
polytexnic-1.3.3 spec/to_html/eqref_spec.rb
polytexnic-1.3.2 spec/to_html/eqref_spec.rb
polytexnic-1.3.1 spec/to_html/eqref_spec.rb
polytexnic-1.3.0 spec/to_html/eqref_spec.rb
polytexnic-1.2.8 spec/to_html/eqref_spec.rb