From 841246995b80e5d58630f6b85f9b6072b2222036 Mon Sep 17 00:00:00 2001 From: Jason Floyd Date: Mon, 15 Sep 2014 07:31:20 -0500 Subject: [PATCH 1/2] failing spec for two centered tables causing unwanted page break --- spec/table_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/table_spec.rb b/spec/table_spec.rb index 6ff9ce7..881ed6e 100644 --- a/spec/table_spec.rb +++ b/spec/table_spec.rb @@ -1577,6 +1577,15 @@ t.cells[2, 3].content.should == "i" end + it 'creates page break with centered table' do + pdf = Prawn::Document.new + + pdf.table [['one', 'two']], position: :center + pdf.table [['three', 'four']], position: :center + pdf.render + pdf.page_count.should == 1 + end + it 'illustrates issue #20', :unresolved, issue: 20 do pdf = Prawn::Document.new description = "one\ntwo\nthree" From 27eef69704aebf18ca2bc23ebffe04c9774c7ba8 Mon Sep 17 00:00:00 2001 From: Jason Floyd Date: Mon, 15 Sep 2014 07:33:36 -0500 Subject: [PATCH 2/2] failing spec for page break with two centered tables --- spec/table_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/table_spec.rb b/spec/table_spec.rb index 881ed6e..7ab8c54 100644 --- a/spec/table_spec.rb +++ b/spec/table_spec.rb @@ -1577,15 +1577,6 @@ t.cells[2, 3].content.should == "i" end - it 'creates page break with centered table' do - pdf = Prawn::Document.new - - pdf.table [['one', 'two']], position: :center - pdf.table [['three', 'four']], position: :center - pdf.render - pdf.page_count.should == 1 - end - it 'illustrates issue #20', :unresolved, issue: 20 do pdf = Prawn::Document.new description = "one\ntwo\nthree" @@ -1603,4 +1594,13 @@ end pdf.render end + + it 'creates page break with centered table' do + pdf = Prawn::Document.new + + pdf.table [['one', 'two']], position: :center + pdf.table [['three', 'four']], position: :center + pdf.render + pdf.page_count.should == 1 + end end