spec/kitabu/toc/html_spec.rb in kitabu-1.0.1 vs spec/kitabu/toc/html_spec.rb in kitabu-1.0.2

- old
+ new

@@ -24,10 +24,11 @@ it "has no body tag" do content.should_not match(/<body>/) end it "generates toc" do + html.should have_tag("div.level1.item-1", "Item 1") html.should have_tag("div.level2.item-1-2", "Item 1.2") html.should have_tag("div.level3.item-1-1-3", "Item 1.1.3") html.should have_tag("div.level4.item-1-1-1-4", "Item 1.1.1.4") html.should have_tag("div.level5.item-1-1-1-1-5", "Item 1.1.1.1.5") html.should have_tag("div.level6.item-1-1-1-1-1-6", "Item 1.1.1.1.1.6") @@ -37,9 +38,10 @@ html.should have_tag("div.level2.internacionalizacao", "InternacionalizaĆ§Ć£o") end it "adds id attribute to content" do + content.should have_tag("h1#item-1", "Item 1") content.should have_tag("h2#item-1-2", "Item 1.2") content.should have_tag("h3#item-1-1-3", "Item 1.1.3") content.should have_tag("h4#item-1-1-1-4", "Item 1.1.1.4") content.should have_tag("h5#item-1-1-1-1-5", "Item 1.1.1.1.5") content.should have_tag("h6#item-1-1-1-1-1-6", "Item 1.1.1.1.1.6")