Sha256: 09ee017c3e52e1ca2c4da132c72fb88b6c099f6597db20f3fb129dd81ad96444

Contents?: true

Size: 614 Bytes

Versions: 2

Compression:

Stored size: 614 Bytes

Contents

require 'spec_helper'

describe Cellular::Jobs::AsyncMessenger do
  let(:sms_stub)    { double "SMS", deliver: true }
  let(:sms_options) { { "recipient" => "12345678", "text" => "Foo" } }

  it 'creates a new SMS object' do
    symbolized_sms_options = { recipient: "12345678", text: "Foo" }

    expect(Cellular::SMS).to receive(:new)
      .with(symbolized_sms_options)
      .and_return sms_stub

    subject.perform sms_options
  end

  it "delivers the SMS" do
    allow(Cellular::SMS).to receive(:new).and_return sms_stub

    expect(sms_stub).to receive :deliver

    subject.perform sms_options
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cellular-2.0.0 spec/cellular/jobs/async_messenger_spec.rb
cellular-1.3.0 spec/cellular/jobs/async_messenger_spec.rb