Sha256: e10150f298af6e1787a3ff3e67190938b9971ff8fff9c170f7292d7bad340f4e

Contents?: true

Size: 737 Bytes

Versions: 14

Compression:

Stored size: 737 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*}
        y
        \end{equation*}

        \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

14 entries across 14 versions & 1 rubygems

Version Path
polytexnic-1.10.8 spec/to_html/eqref_spec.rb
polytexnic-1.10.7 spec/to_html/eqref_spec.rb
polytexnic-1.10.6 spec/to_html/eqref_spec.rb
polytexnic-1.10.5 spec/to_html/eqref_spec.rb
polytexnic-1.10.4 spec/to_html/eqref_spec.rb
polytexnic-1.10.3 spec/to_html/eqref_spec.rb
polytexnic-1.10.2 spec/to_html/eqref_spec.rb
polytexnic-1.10.1 spec/to_html/eqref_spec.rb
polytexnic-1.10.0 spec/to_html/eqref_spec.rb
polytexnic-1.9.2 spec/to_html/eqref_spec.rb
polytexnic-1.9.1 spec/to_html/eqref_spec.rb
polytexnic-1.9.0 spec/to_html/eqref_spec.rb
polytexnic-1.8.2 spec/to_html/eqref_spec.rb
polytexnic-1.8.1 spec/to_html/eqref_spec.rb