Class: Jets::Testing::MailboxForHelper::Mailbox

Inherits:
Object
  • Object
show all
Defined in:
lib/jets/testing/helpers/mailbox_for_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#emailObject (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

#deliveriesObject



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