Get this in your Cucumber steps.
Then /^show me the page$/ do
save_and_open_page
end
Thanks to the magic of webrat’s lesser known save_and_open_page, this will save the current page to a temporary file and open it in your browser. Be sure to gem install launchy
for it to work.
Here’s a sample of show me the page in a scenario:
Scenario: Signing in
When I go to the home page
And I fill in "username" with "john"
And I fill in "password" with "john"
Then show me the page
Very useful for debugging.