mattheworiordan/capybara-screenshot — pull request #78 by noniq (2014-03-11 00:28:50+00:00)
Title: Use reporters to improve screenshot info in RSpec output

Breaking changes:
* `Capybara::Screenshot.append_screenshot_path` has been renamed to `Capybara::Screenshot::RSpec.add_link_to_screenshot_for_failed_examples`

User visible changes:
* By default, RSpec’s HTML output (when using HtmlFormatter or TextMateFormatter) for failed examples now includes links to the screenshot and saved HTML (if available):
![screenshot](https://f.cloud.github.com/assets/244158/2380770/063cc8b4-a8b2-11e3-99b6-a20ff2f73749.png)

* The `full_description` of a failed example is no longer modified to include information about screenshots (the paths / links are printed as part of the additional failure info instead). This should avoid problems with CI relying on the exact contents of `full_description`.

Though the pull request may look quite big, changes to existing code are relatively minor (check 578265d for the actual changes in `rspec.rb`, the combined diff looks rather chaotic because of the extract method refactoring in 4afb815).

Finally, `HtmlEmbedReporter` propably isn’t very useful as such – it’s more like a proof of concept to demonstrate how easy it is to implement and switch reporters :-)

Tested with: Ruby 1.9 / 2.0, RSpec 2.11 / 2.14 / 3.0