Class: Jets::Testing::MailboxForHelper::Mailbox
- Inherits:
-
Object
- Object
- Jets::Testing::MailboxForHelper::Mailbox
- Defined in:
- lib/jets/testing/helpers/mailbox_for_helper.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
Instance Method Summary collapse
- #deliveries ⇒ Object
-
#initialize(email) ⇒ Mailbox
constructor
A new instance of Mailbox.
Constructor Details
#initialize(email) ⇒ Mailbox
Returns a new instance of Mailbox.
10 11 12 |
# File 'lib/jets/testing/helpers/mailbox_for_helper.rb', line 10 def initialize(email) @email = email end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
6 7 8 |
# File 'lib/jets/testing/helpers/mailbox_for_helper.rb', line 6 def email @email end |
Instance Method Details
#deliveries ⇒ Object
14 15 16 17 18 |
# File 'lib/jets/testing/helpers/mailbox_for_helper.rb', line 14 def deliveries ActionMailer::Base.deliveries.select do |mail| mail.destinations.include?(email) end end |