added spec for issue #502 - works without problems with the current code
fixes #502
Merge branch 'issue_502_fixed' of https://github.com/hbrandl/prawn