Use Capybara on any HTML fragment or page

I think this pattern is really useful not just for upgrading suites from Webrat, but really anywhere you have an HTML fragment or string that you’d like to use Capybara’s matchers on.

Lexy Almost 13 years ago