How to test prawn-templates?

78 views
Skip to first unread message

Danillo Souza

unread,
Aug 16, 2017, 2:41:05 PM8/16/17
to Prawn
hey guys,
I'm using prawn-template to change a couple of PDFs we have here but I'm not sure what's the best way to test it.

I basically want to make sure that I'm calling the methods that changes my PDF file.

Prawn::Document.generate('/tmp/pdf.pdf', :margin => [0,0,0,0], template: '/path/to/my/template.pdf')) do
          go_to_page
1

          image
'/path/to/image.png', at: [100, 100], fit: [105, 35]
end

Is there a chance I can assert that I'm calling `go_to_page` and `image` methods?

Cheers,
Danillo Souza
Reply all
Reply to author
Forward
0 new messages