spec/components/anchors_spec.rb in reverse_markdown-0.3.0 vs spec/components/anchors_spec.rb in reverse_markdown-0.4.0
- old
+ new
@@ -4,11 +4,20 @@
let(:input) { File.read('spec/assets/anchors.html') }
let(:document) { Nokogiri::HTML(input) }
subject { ReverseMarkdown.parse_string(input) }
- it { subject.should include '[Foobar](http://foobar.com)' }
- it { subject.should include '[**Strong foobar**](http://strong.foobar.com)' }
- it { subject.should include '![http://foobar.com/logo.png]' }
- it { subject.should include '![foobar image][http://foobar.com/foobar.png]' }
+ 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 '  ' }
+ it { should include '  ' }
+ it { should include '  ' }
+
+ 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
\ No newline at end of file