mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-09 22:22:37 +01:00
also removes deprecated methods. All tests pass (at least on my machine!) and raise no deprecation warnings. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@365 a4c988fc-2ded-0310-b66e-134b36920a42
30 lines
584 B
Ruby
30 lines
584 B
Ruby
require 'test/unit'
|
|
|
|
$:.unshift "#{File.dirname(__FILE__)}/../lib"
|
|
require 'action_mailer'
|
|
|
|
# Show backtraces for deprecated behavior for quicker cleanup.
|
|
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
|