How can I see what capybara found in a failing cucumber step? How can I see what capybara found in a failing cucumber step? ruby-on-rails ruby-on-rails

How can I see what capybara found in a failing cucumber step?


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


Try adding this step:

Then show me the page


If you want to have the browser open the page when the page fails you use the 'launchy' gem.Add it to your gem file, and then in /features/support create a file called debugging.rb with contents:

After do |scenario|   save_and_open_page if scenario.failed?end