Sha256: c30e332099e6d63636bce6999c56cfce04dfa8b0f9e0496504e90196ed14cea4

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

describe ReverseMarkdown::Mapper do

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

  it { should include ' [Foobar](http://foobar.com) ' }
  it { should include ' [Fubar](http://foobar.com "f***** up beyond all recognition") ' }
  it { should include ' [**Strong foobar**](http://strong.foobar.com) ' }

  it { should include ' ![](http://foobar.com/logo.png) ' }
  it { should include ' ![foobar image](http://foobar.com/foobar.png) ' }
  it { should include ' ![foobar image 2](http://foobar.com/foobar2.png "this is the foobar image 2") ' }
  it { should include 'extra space after the [anchor](http://foobar.com).'}
  it { should include 'But inline, [there](http://foobar.com) should be a space.'}

  context "links to ignore" do
    it { should include ' ignore anchor tags with no link text ' }
    it { should include ' pass through the text of internal jumplinks without treating them as links ' }
    it { should include ' pass through the text of anchor tags with no href without treating them as links ' }
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
reverse_markdown-0.4.4 spec/components/anchors_spec.rb
reverse_markdown-0.4.3 spec/components/anchors_spec.rb
reverse_markdown-0.4.2 spec/components/anchors_spec.rb
reverse_markdown-0.4.1 spec/components/anchors_spec.rb