Hello
' end it 'adds no book authors if there are none' do book, = to_epub fixture_file('author/book-no-author.adoc') expect(book.creator).to be_nil expect(book.creator_list.size).to eq(0) end it 'adds a single book author' do book, = to_epub fixture_file('author/book-one-author.adoc') expect(book.creator).not_to be_nil expect(book.creator.content).to eq('Author One') expect(book.creator.role.content).to eq('aut') expect(book.creator_list.size).to eq(1) end it 'adds multiple book authors' do book, = to_epub fixture_file('author/book-multiple-authors.adoc') expect(book.metadata.creator).not_to be_nil expect(book.metadata.creator.content).to eq('Author One') expect(book.metadata.creator.role.content).to eq('aut') expect(book.creator_list.size).to eq(2) expect(book.metadata.creator_list[0].content).to eq('Author One') expect(book.metadata.creator_list[1].content).to eq('Author Two') end it 'adds the publisher if both publisher and producer are defined' do book, = to_epub fixture_file('author/book-one-author.adoc') expect(book.publisher).not_to be_nil expect(book.publisher.content).to eq('MyPublisher') end it 'adds the producer as publisher if no publisher is defined' do book, = to_epub fixture_file('author/book-no-author.adoc') expect(book.publisher).not_to be_nil expect(book.publisher.content).to eq('MyProducer') end it 'adds book series metadata' do book = to_epub <<~EOS = Article :series-name: My Series :series-volume: 42 :series-id: bla EOS meta = book.metadata.meta_list[1] expect(meta).not_to be_nil expect(meta['property']).to eq('belongs-to-collection') expect(meta.content).to eq('My Series') expect(meta.refiner('group-position').content).to eq('42') 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 "doesn't crash when sees inline toc" do book = to_epub <<~EOS = Title toc::[] EOS expect(book).not_to be_nil end it 'does not crash when sees inline pass macro `m` with an icon' do book = to_epub <<~EOS = Test :icons: font :call-to-action: pass:m,q[icon:hand-o-right[] *Call to Action*] {call-to-action} EOS expect(book).not_to be_nil end # Test for https://github.com/asciidoctor/asciidoctor-epub3/issues/472 it 'does not crash when sees inline anchor' do book = to_epub <<~EOS = Test :doctype: book [[chapter-1]] == Chapter 1 == <