lambcr/rspec-webdriver — pull request #2 by antifun (2012-02-14 00:48:58+00:00)
Title: RSpec 2.8 compatibility

Man, this was fun to figure out. So I'd removed the explicit gem usage (maybe I don't want to have this code go grab a gem, maybe bundler already did it for me, mkay?) and screenshots, etc. didn't work.

Both halves of the mechanism broke. The part that tries to record state when there is an error blew up because RSpec moved the PendingExampleFixedError into an inner module "Pending". Simple enough.

The other part makes much less sense. The code in this gem is trying to append a placeholder to the formatted output generated by the default formatter. That isn't getting returned as a string, but rather a StringIO object, which doesn't (anymore?) support the `+` method. Concatenation with `<<` works fine. What's weird is that StringIO is not part of RSpec proper and the rspec-webdriver code looked like it was always expecting to get a StringIO object (notice the call to `@output.string` on line 50 in `selenium_test_report_formatter.rb`). So...spooky?