lib/capybara/email/dsl.rb
# Access all emails for a recipient.
#
# @param [String]
#
# @return [Array<Mail::Message>]
Access all emails for a recipient.
Access all emails for a recipient .
def emails_sent_to(recipient)
    self.current_emails = all_emails.select { |email| [email.to, email.cc, email.bcc].flatten.compact.include?(recipient) }.map do |email|
      driver = Capybara::Email::Driver.new(email)
      Capybara::Node::Email.new(Capybara.current_session, driver)
    end
  end
def emails_sent_to ( recipient ) self . current_emails = all_emails . select { | email | [ email . to , email . cc , email . bcc ] . flatten . compact . include? ( recipient ) } . map do | email | driver = Capybara :: Email :: Driver . new ( email ) Capybara :: Node :: Email . new ( Capybara . current_session , driver ) end end
Access all emails for a recipient.
Access all emails for a recipient .
None
Array<Mail::Message>
recipient
<not_specific>
<not_specific>
None