Skip to content

Commit

Permalink
remove use of tall.svg in floating title spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Aug 4, 2023
1 parent cc73961 commit ce51cdc
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions spec/floating_title_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,32 +138,34 @@
backend = %(pdf#{ext_class.object_id})
source_lines[0] = %( register_for '#{backend}'\n)
ext_class.class_eval source_lines.join, source_file
pdf = to_pdf <<~END, backend: backend, analyze: true
[discrete]
== Heading A
with_content_spacer 200, 600 do |spacer_path|
pdf = to_pdf <<~END, backend: backend, analyze: true
[discrete]
== Heading A
[discrete]
== Heading B
[discrete]
== Heading B
image::tall.svg[pdfwidth=65mm]
image::#{spacer_path}[pdfwidth=65mm]
[discrete]
== Heading C
[discrete]
== Heading C
[%unbreakable]
--
keep
[%unbreakable]
--
keep
this
this
together
--
END
together
--
END

heading_c_text = pdf.find_unique_text 'Heading C'
(expect heading_c_text[:page_number]).to be 2
content_text = pdf.find_unique_text 'keep'
(expect content_text[:page_number]).to be 2
heading_c_text = pdf.find_unique_text 'Heading C'
(expect heading_c_text[:page_number]).to be 2
content_text = pdf.find_unique_text 'keep'
(expect content_text[:page_number]).to be 2
end
end

it 'should not force discrete heading to next page if heading-min-height-after value is not set' do
Expand Down

0 comments on commit ce51cdc

Please sign in to comment.