Class: Tape::Adapters::ActionMailer::Test

Inherits:
Base
  • Object
show all
Defined in:
lib/tape/adapters/action_mailer/test.rb

Overview

For ActionMailer with delivery_method = :test

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#by_recipient, #initialize, #parse

Constructor Details

This class inherits a constructor from Tape::Adapters::Base

Instance Method Details

#allObject



10
11
12
# File 'lib/tape/adapters/action_mailer/test.rb', line 10

def all
  ActionMailer::Base.deliveries
end

#lastObject



14
15
16
# File 'lib/tape/adapters/action_mailer/test.rb', line 14

def last
  ActionMailer::Base.deliveries.last
end

#resetObject



18
19
20
# File 'lib/tape/adapters/action_mailer/test.rb', line 18

def reset
  ActionMailer::Base.deliveries.clear
end