Cucumber is great for integration testing but when a feature fails for a web application you just get the content of the page spewed out onto the console.

If only you could see a screenshot of the whole web page that produced the failure.

The good news for those of you on OS X is that you can.

Just install my cucumber-screenshot gem.

gem install cucumber-screenshot

And follow the set up instructions to start snapping.

Enjoy.

If you are on another platform and want this functionality then feel free to change the code.

Thanks go to Juris Galang for writing the snapurl gem (which actually handles making the screenshots) and to Aslak Hellesoy and Matt Wynne for their help and advice integrating this with Cucumber.