diff --git a/spec/guide_toc_spec.rb b/spec/guide_toc_spec.rb index 3be3e98d89e274bd3c3aa495e4383f03c7a2b999..cdbf55c144634273eb4135f69823ffdc4e7f7b76 100644 --- a/spec/guide_toc_spec.rb +++ b/spec/guide_toc_spec.rb @@ -72,12 +72,19 @@ describe JsDuck::GuideToc do EOHTML end - it "ignores HTML in headings" do - inject(<<-EOHTML).should =~ /

My Chapter/ + it "keeps HTML in headings" do + inject(<<-EOHTML).should =~ /

My Chapter<\/span>/

My Chapter

EOHTML end + it "strips HTML from TOC entries" do + inject(<<-EOHTML).should =~ /My Chapter/ +

My Chapter 1

+

My Chapter 2

+ EOHTML + end + it "adds ID-s also all H* headings" do inject(<<-EOHTML).should =~ /
My Chapter/
My Chapter