30 Jan 2012, 03:53
Generic-user-small

M M (5 posts)

Hi, I’m getting this failure on the tests in chapter 1 page 22

1) Failure: test_pdf_request_sends_a_pdf_as_file(NavigationTest) [/Users/michaeljohnmitchell/Sites/pdf_renderer/test/integration/navigation_test.rb:12]: Expected /Prawn/ to match “”.

I don’t understand why it’s expecting it to match “” when the test is asserting that it matches page.body

test ‘pdf request sends a pdf as file’ do visit home_path click_link ‘PDF’

assert_equal 'binary', headers['Content-Transfer-Encoding']
assert_equal 'attachment; filename="contents.pdf"',
  headers['Content-Disposition']
assert_equal 'application/pdf', headers['Content-Type']
assert_match /Prawn/, page.body   end
29 Mar 2012, 18:19
Img_proxy.php_pragsmall

Yasuo Honda (4 posts)

I have the same issue. I’d like to know if anyone has finished this integration test successfully.

02 Apr 2012, 04:30
Generic-user-small

Jayson Bailey (1 post)

Same error.

16 Apr 2012, 20:50
Generic-user-small

Noah F. Stern (1 post)

Try using page.source instead of page.body.

This link gave me the clue: http://stackoverflow.com/questions/6835205/cucumber-reading-a-pdf-into-a-temp-file

  You must be logged in to comment