Skip to content

Commit

Permalink
verify exception is raised if width is not assigned to column
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Sep 4, 2019
1 parent 193fe0a commit 4f15d96
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/table_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@
end

context 'Dimensions' do
it 'should throw exception if no width is assigned to column' do
(expect {
to_pdf <<~'EOS'
[cols=",50%,50%"]
|===
| Column A | Column B | Column C
|===
EOS
}).to raise_exception ::Prawn::Errors::CannotFit
end

it 'should not fail to fit text in cell' do
pdf = to_pdf <<~'EOS', analyze: true
|===
Expand Down

0 comments on commit 4f15d96

Please sign in to comment.