test/action_mailer.rb in zendesk-ar_mailer-1.4.5 vs test/action_mailer.rb in zendesk-ar_mailer-1.4.6
- old
+ new
@@ -103,20 +103,20 @@
class Email
START = Time.parse 'Thu Aug 10 2006 11:19:48'
- attr_accessor :from, :to, :mail, :last_send_attempt, :created_on, :id
+ attr_accessor :from, :to, :mail, :last_send_attempt, :created_on, :id, :context
@records = []
@id = 0
class << self; attr_accessor :records, :id; end
def self.create(record)
record = new record[:from], record[:to], record[:mail],
- record[:last_send_attempt]
+ record[:last_send_attempt], record[:context]
records << record
return record
end
def self.destroy_all(conditions)
@@ -145,16 +145,17 @@
def self.reset
@id = 0
records.clear
end
- def initialize(from, to, mail, last_send_attempt = nil)
+ def initialize(from, to, mail, last_send_attempt = nil, context = nil)
@from = from
@to = to
@mail = mail
@id = self.class.id += 1
@created_on = START + @id
@last_send_attempt = last_send_attempt || 0
+ @context = context
end
def destroy
self.class.records.delete self
self.freeze