# encoding=utf-8 require 'spec_helper' describe "articles" do let(:pipeline) { Polytexnic::Pipeline.new(polytex, article: true) } subject(:processed_text) { pipeline.to_html } let(:polytex) do <<-'EOS' Lorem ipsum \section{Foo} \label{sec:foo} \begin{figure} lorem \label{fig:foo} \end{figure} \begin{table} \begin{tabular}{cc} HTTP request & URL \\ GET & /users \\ GET & /users/1 \end{tabular} \label{table:foo} \end{table} \begin{codelisting} \codecaption{Creating a \texttt{gem} configuration file. \\ \filepath{path/to/file}} \label{code:create_gemrc} %= lang:console \begin{code} $ subl .gemrc \end{code} \end{codelisting} Listing~\ref{code:create_gemrc}\footnote{asdfasdf} Section~\ref{sec:foo} Figure~\ref{fig:foo} EOS end let(:section) { '1 ' } let(:figure) { 'Figure 1' } let(:table) { 'Table 1' } let(:listing) { 'Listing 1:' } let(:footnote) { '1' } let(:sref) { 'Section 1' } let(:fref) { 'Figure 1' } let(:lref) { 'Listing 1' } let(:fntext) { 'asdfasdf' } describe "section" do describe "numbering" do it { should include section } end describe "xref" do it { should resemble sref } end end describe "figure" do describe "numbering" do it { should include figure } end describe "xref" do it { should resemble fref } end end describe "listing" do describe "numbering" do it { should include listing } end describe "xref" do it { should resemble lref } end end describe "footnote" do it { should include '
' } describe "numbering" do it { should include footnote } end describe "footnote text" do it { should include fntext } end end end