From c00bc6d1c6d431abb78fbf2aaee6b32d0fa2e78f Mon Sep 17 00:00:00 2001 From: Jason Floyd Date: Thu, 11 Sep 2014 07:16:50 -0500 Subject: [PATCH] Failing spec for issue #20 Failing spec for issue #20 Failing spec for issue #20 --- spec/table_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/table_spec.rb b/spec/table_spec.rb index a7e77c5..6ff9ce7 100644 --- a/spec/table_spec.rb +++ b/spec/table_spec.rb @@ -1576,4 +1576,22 @@ t.cells[2, 2].content.should == "h" t.cells[2, 3].content.should == "i" end + + it 'illustrates issue #20', :unresolved, issue: 20 do + pdf = Prawn::Document.new + description = "one\ntwo\nthree" + bullets = description.split("\n") + bullets.each_with_index do |bullet, ndx| + rows = [[]] + + if ndx < 1 + rows << [ { content: "blah blah blah", colspan: 2, font_style: :bold, size: 12, padding_bottom: 1 }] + else + rows << [ { content: bullet, width: 440, padding_top: 0, align: :justify } ] + end + + pdf.table(rows, header: true, width: 465, cell_style: { border_width: 0, inline_format: true }) + end + pdf.render + end end