Skip to content

Commit aee05e0

Browse files
tompratsmojavelinux
authored andcommitted
Add test for padding
1 parent 3a01dcf commit aee05e0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spec/prawn/document_spec.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,19 @@ def self.format(string)
126126
expect(pdf.instance_variable_get(:@background)).to eq(filename)
127127
end
128128
end
129+
130+
it 'retains the current margin and padding' do
131+
initial_absolute_left = pdf.bounds.absolute_left
132+
133+
pdf.bounding_box [0, pdf.cursor], width: pdf.bounds.width do
134+
pdf.bounds.move_past_bottom
135+
end
136+
pdf.indent 20 do
137+
pdf.bounds.move_past_bottom
138+
end
139+
140+
expect(pdf.bounds.absolute_left).to eq(initial_absolute_left)
141+
end
129142
end
130143

131144
describe '#float' do

0 commit comments

Comments
 (0)