dockyard/capybara-email — pull request #20 by nbudin (2013-04-02 19:05:10+00:00)
Title: Decode email body before attempting to parse it

In [some cases](http://guides.rubyonrails.org/action_mailer_basics.html#auto-encoding-header-values), Rails apps will generate email using quoted-printable encoding. When this happens, capybara-email won't decode the HTML body before attempting to parse it, which leads to strange behavior.

(For example, I saw it attempt to follow a link that began with `=3Dhttps://www...`, because there happened to be a line break before the https.)

This patch uses `Mail::Message#to_s` to automatically decode the body before attempting to do anything with it.