dockyard/capybara-email — pull request #36 by michaeldupuisjr (2014-02-07 21:20:23+00:00)
Title: Adds methods for retrieving headers from a message.

These methods allow us to retrieve optional methods added to emails.

From what I can tell, we can't delegate retrieval of the headers to [Mail::Message#header]https://github.com/mikel/mail/blob/master/lib/mail/message.rb#L411) and easily access an optional header which has been passed in. All headers are returned.

This introduces a discrepancy between how `#header` functions when called on an email in capybara-email and how it functions in `Mail::Message#header`. I'm open to renaming these methods `optional_header` and `optional_headers` to denote that we're retrieving those from the email and to maintain consistency with how the api is currently implemented (delegating to `Mail::Message` when possible).