diff options
Diffstat (limited to 'actionmailer/test/abstract_unit.rb')
-rw-r--r-- | actionmailer/test/abstract_unit.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 75690b49ad..8a30e39a2b 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -8,3 +8,23 @@ ActiveSupport::Deprecation.debug = true $:.unshift "#{File.dirname(__FILE__)}/fixtures/helpers" ActionMailer::Base.template_root = "#{File.dirname(__FILE__)}/fixtures" + +class MockSMTP + def self.deliveries + @@deliveries + end + + def initialize + @@deliveries = [] + end + + def sendmail(mail, from, to) + @@deliveries << [mail, from, to] + end +end + +class Net::SMTP + def self.start(*args) + yield MockSMTP.new + end +end |