summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/running_content_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/running_content_spec.rb b/spec/running_content_spec.rb
index 67d1f3e3..97bcc172 100644
--- a/spec/running_content_spec.rb
+++ b/spec/running_content_spec.rb
@@ -46,6 +46,17 @@ describe 'Asciidoctor::PDF::Converter - Running Content' do
(expect pdf.find_text %r/^\d+$/).to be_empty
end
+ it 'should not attempt to add running content if document has no body' do
+ pdf = to_pdf <<~'EOS', attributes: { 'nofooter' => 'nil' }, analyze: true
+ = Document Title
+ :doctype: book
+ EOS
+
+ text = pdf.text
+ (expect text).to have_size 1
+ (expect text[0][:string]).to eql 'Document Title'
+ end
+
it 'should start running content at title page if running_content_start_at key is title' do
theme_overrides = { running_content_start_at: 'title' }