Sha256: 50282a02e098747ac3a5773593b2b573700176ceb3b35c5aefad8b3d4dc61a47

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

require 'spec_helper'

describe ArMailerAWS do

  it 'setup yields ArMailerAWS' do
    ArMailerAWS.setup do |config|
      config.should == ArMailerAWS
    end
  end

  describe '#run', focus: true do
    before do
      @sender = ArMailerAWS::Sender.new(delay: 1)
      ArMailerAWS::Sender.stub(:new).and_return(@sender)
    end

    it 'run sender' do
      @sender.should_receive(:send_batch).twice
      begin
        Timeout::timeout(2) do
          ArMailerAWS.run({})
        end
      rescue Timeout::Error
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ar_mailer_aws-0.0.1 spec/ar_mailer_aws/ar_mailer_aws_spec.rb