Sha256: e4107d2c964f30a030e7c06d03025f06b3e3e49663e248d62c34b85a45bfd649

Contents?: true

Size: 606 Bytes

Versions: 3

Compression:

Stored size: 606 Bytes

Contents

require File.join(File.dirname(__FILE__), "../spec_helper")

module Emailer
  describe MockSmtpFacade do
    
    describe :initialize do
      it "Should be able to send without actulay sending anything" do
        
        message = {:to => "test@bits2life.com",
        :from => "test@bits2life.com",
        :subject => "A test",
        :body => "A test body"}
        
        smtp = MockSmtpFacade.new
        
        smtp.open do
          smtp.send_mail(
            message
          )
        end
        
        smtp.last_email_sent.should == message
        
      end
    end
    
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bjornblomqvist-emailer-0.1.11 spec/emailer/mock_smtp_facade_spec.rb
bjornblomqvist-emailer-0.1.12 spec/emailer/mock_smtp_facade_spec.rb
bjornblomqvist-emailer-0.1.13 spec/emailer/mock_smtp_facade_spec.rb