Skip to content

Commit

Permalink
Fix regression in GuideToc tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nene committed Dec 6, 2013
1 parent ec0fc59 commit 1190666
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions spec/guide_toc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,19 @@ def inject(html)
EOHTML
end

it "ignores HTML in headings" do
inject(<<-EOHTML).should =~ /<h2 id='myguide-section-my-chapter'>My Chapter/
it "keeps HTML in headings" do
inject(<<-EOHTML).should =~ /<h2 id='myguide-section-my-chapter'>My <span>Chapter<\/span>/
<h2>My <span>Chapter</span></h2>
EOHTML
end

it "strips HTML from TOC entries" do
inject(<<-EOHTML).should =~ /<a href='#!\/guide\/myguide-section-my-chapter-1'>My Chapter/
<h2>My <span>Chapter</span> 1</h2>
<h2>My <span>Chapter</span> 2</h2>
EOHTML
end

it "adds ID-s also all H* headings" do
inject(<<-EOHTML).should =~ /<h5 id='myguide-section-my-chapter'>My Chapter/
<h5>My Chapter</h5>
Expand Down

0 comments on commit 1190666

Please sign in to comment.