module EmailSpectacular::ActionMailerAdaptor
Public Instance Methods
clear_emails()
click to toggle source
Clears the list of sent emails.
@return void
# File lib/email_spectacular/adaptors/action_mailer_adaptor.rb, line 19 def clear_emails ActionMailer::Base.deliveries = [] end
email()
click to toggle source
Syntactic sugar for referencing the list of emails sent since the start of the test
@example Asserting email has been sent
expect(email).to have_been_sent.to('test@email.com')
@return [Array<Mail::Message>] List of sent emails
# File lib/email_spectacular/adaptors/action_mailer_adaptor.rb, line 12 def email ActionMailer::Base.deliveries end