require 'rubygems' require 'log4r' require 'pony' require_relative '../lib/depengine/helper/validations' require_relative '../lib/depengine/helper/mail' require_relative '../lib/depengine/log/log' $log = Log::DeploymentLogger.new $log.writer.level = Log4r::ERROR describe "mail delivery" do it "should send an email via smtp" do options = {} options[:from] = "#{ENV['USER']}@localhost" options[:to] = "#{ENV['USER']}@localhost" options[:subject] = "spec mail #{Time.now.to_s}" options[:body] = 'test mail' worker = Helper::Mail.new worker.smtp_host = 'localhost' worker.sendmail(options) end end