Ruby-on-rails – How to see what capybara found in a failing cucumber step

capybaracucumberruby-on-railswebrat

I started migrating from cucumber + webrat to cucumber + capybara. Now the behavior of "I should see " seems to be somewhat different. Most of these fail now, although I didn't change anything on the page. I replaced the snippet that should be found with some stuff that is on every page and for some text it works and for other text it doesn't. I can't find any pattern in what is found in the page's content and what is not.
Webrat used to print what the page content is that it found, in case it did not contain the required phrase. Is there anyway to have capybara show what text it got from the page in which it tried to find the text?

Best Answer

Then show me the page calls webrat/capybara's underlying save_and_open_page method. Found that useful when working with steak.