diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2020-07-01 15:16:28 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-01 15:16:28 +0300 |
| commit | 12f9f1c1992cd9dec2adeee3e7eb1f24bf336b57 (patch) | |
| tree | 4e9f488ab08197a8c7bc9575df66315c28994933 /spec | |
| parent | 552171c3b6d035fa97231ef7a65a5eaefd6ed573 (diff) | |
resolves #174 add support for inline TOC (#342)
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/converter_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/converter_spec.rb b/spec/converter_spec.rb index 2ac2cb7..306c3a3 100644 --- a/spec/converter_spec.rb +++ b/spec/converter_spec.rb @@ -239,6 +239,20 @@ text3 expect(meta.refiner('dcterms:identifier').content).to eq('bla') end + it 'adds toc to spine' do + book = to_epub <<~EOS += Title +:toc: + +Text + EOS + spine = book.spine.itemref_list + expect(spine).to have_size(2) + toc = book.items[spine[0].idref] + expect(toc).not_to be_nil + expect(toc.href).to eq('toc.xhtml') + end + it 'supports video' do book, = to_epub fixture_file('video/book.adoc') chapter = book.item_by_href '_chapter.xhtml' |
