Sha256: a69b367be574b9be7ce66c8c7ce13074f58c6663f4a19853218808d71078c4cb

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

require 'spec_helper'

describe ReverseAsciidoctor do

  let(:input)    { File.read('spec/assets/anchors.html') }
  let(:document) { Nokogiri::HTML(input) }
  subject { ReverseAsciidoctor.convert(input) }

  it { is_expected.to include 'http://foobar.com[Foobar]' }
  it { is_expected.to include 'http://foobar.com[Fubar]' }
  it { is_expected.to include 'http://foobar.com[f\*\*\*\*\* up beyond all redemption]' }
  it { is_expected.to include 'http://strong.foobar.com[*Strong foobar*]' }

  it { is_expected.to include 'There should be space before but not after the anchor ( http://foobar.com[stripped]).' }

  it { is_expected.to include ' do not ignore link:foo.html[] anchor tags with no link text ' }
  it { is_expected.to include ' link <<content,internal jumplinks>> with anchors ' }
  it { is_expected.to include ' link <<content2>>internal jumplinks without anchors ' }
  it { is_expected.to include ' treat [[content]] as bookmarks ' }

  it { is_expected.to include "<<a_bspaced,Double \\_\\_ anchor with space>>" }
  it { is_expected.to include "[[a_bspaced]]" }
  it { is_expected.to include "[[a_Foreword]]\n== Text" }
  it { is_expected.not_to include "[[_Toc12345]]" }

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reverse_adoc-0.2.8 spec/components/anchors_spec.rb
reverse_adoc-0.2.7 spec/components/anchors_spec.rb
reverse_adoc-0.2.6 spec/components/anchors_spec.rb