Having a glance at how prawn is tested, I managed to make this initial test pass using latests versions of capybara (1.1.1) and prawn (0.12.0) by replacing
assert_match /Prawn/, page.body
with
src_txt = PDF::Inspector::Text.analyze(page.source)
assert_match /Prawn/, src_txt.strings.first
I had to install the ‘pdf-inspector’ gem, and require ‘pdf/inspector’ in test_helper.rb
It seems that due to page.body containing PDF raw data which makes Capybara::Session trip when you try to evaluate it.