From 11906663118fd22b7ae0bc6cae672385b8b5cd29 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Fri, 6 Dec 2013 09:34:36 +0200 Subject: [PATCH] Fix regression in GuideToc tests. --- spec/guide_toc_spec.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/spec/guide_toc_spec.rb b/spec/guide_toc_spec.rb index 3be3e98d..cdbf55c1 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
-- GitLab