Sha256: ae290e7b6f33ed405ebc74f8358c38e89c5338568d0929ea720ec39c5e63035c

Contents?: true

Size: 1.43 KB

Versions: 5

Compression:

Stored size: 1.43 KB

Contents

require "spec_helper"
describe Asciidoctor::RFC::V2::Converter do
  it "renders a maximal example" do
    expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
      [[id]]
      .Figure 1
      [align=left,alt=Alt Text,suppress-title=true]
      ====
      [[id2]]
      .figure1.txt
      ....
      Figures are only permitted to contain listings (sourcecode), images (artwork), or literal (artwork)
      ....
      ====
    INPUT
      <figure anchor="id" align="left" alt="Alt Text" title="Figure 1" suppress-title="true">
      <artwork name="figure1.txt"><![CDATA[
      Figures are only permitted to contain listings (sourcecode), images (artwork), or literal (artwork)
      ]]></artwork>
      </figure>
    OUTPUT
  end

  it "renders preambles and postambles in example" do
    expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
      ====
      Preamble text

      .figure1.txt
      ....
      Figures are only permitted to contain listings (sourcecode), images (artwork), or literal (artwork)
      ....

      Postamble text
      ====
    INPUT
      <figure>
      <preamble>
      Preamble text
      </preamble>
      <artwork name="figure1.txt"><![CDATA[
      Figures are only permitted to contain listings (sourcecode), images (artwork), or literal (artwork)
      ]]></artwork>
      <postamble>
      Postamble text
      </postamble>
      </figure>
    OUTPUT
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
asciidoctor-rfc-0.9.2 spec/asciidoctor/rfc/v2/example_spec.rb
asciidoctor-rfc-0.9.1 spec/asciidoctor/rfc/v2/example_spec.rb
asciidoctor-rfc-0.9.0 spec/asciidoctor/rfc/v2/example_spec.rb
asciidoctor-rfc-0.8.5 spec/asciidoctor/rfc/v2/example_spec.rb
asciidoctor-rfc-0.8.3 spec/asciidoctor/rfc/v2/example_spec.rb