Sha256: e959dc8eeeef96ce2f2685c1cc5d61966516687265267380a3927ed477bc8881

Contents?: true

Size: 654 Bytes

Versions: 13

Compression:

Stored size: 654 Bytes

Contents

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
depengine-3.0.12 spec/mail_spec.rb
depengine-3.0.11 spec/mail_spec.rb
depengine-3.0.10 spec/mail_spec.rb
depengine-3.0.9 spec/mail_spec.rb
depengine-3.0.8 spec/mail_spec.rb
depengine-3.0.7 spec/mail_spec.rb
depengine-3.0.6 spec/mail_spec.rb
depengine-3.0.5 spec/mail_spec.rb
depengine-3.0.4 spec/mail_spec.rb
depengine-3.0.3 spec/mail_spec.rb
depengine-3.0.2 spec/mail_spec.rb
depengine-3.0.1 spec/mail_spec.rb
depengine-3.0.0 spec/mail_spec.rb