Sha256: f8cf439583e286691653ed50a799c7e19bd978d9603b266becdd61072f84b142

Contents?: true

Size: 1.41 KB

Versions: 3

Compression:

Stored size: 1.41 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">
      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">
      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

3 entries across 3 versions & 1 rubygems

Version Path
asciidoctor-rfc-0.8.2 spec/asciidoctor/rfc/v2/example_spec.rb
asciidoctor-rfc-0.8.0 spec/asciidoctor/rfc/v2/example_spec.rb
asciidoctor-rfc-0.2.0 spec/asciidoctor/rfc/v2/example_spec.rb