Last active
April 6, 2016 18:21
-
-
Save pnomolos/df58340a9c019344206e07269b3ef104 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you're sending html-only mail (Shame on you! 😆) you can use the following so you get support for | |
# it { should have_sent_email.matching_html_part(/html-only contents/) } | |
module Mail | |
module Matchers | |
class HasSentEmailMatcher | |
def matching_html_part(html_part_matcher) | |
@html_part_matcher = html_part_matcher | |
self | |
end | |
def matches_on_html_part_matcher?(delivery) | |
@html_part_matcher.match delivery.html_part.raw_source | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment