1 2 3 4 5 6 7 8 9 10 11 12
module ActionMailer module DeliveryMethod # A delivery method implementation designed for testing, which just appends each record to the :deliveries array class Test < Method def perform_delivery(mail) ActionMailer::Base.deliveries << mail end end end end