Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@coaxial

coaxial/test.rb Secret

Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coaxial/6a0002761ce6c2704747 to your computer and use it in GitHub Desktop.
Save coaxial/6a0002761ce6c2704747 to your computer and use it in GitHub Desktop.
# encoding: utf-8
require 'spec_helper'
require 'call_controllers/outbound_call'
describe OutboundCallController do
let(:number_to_dial) { "5551231234" }
let(:mock_call) { double 'Call', to: "sip:#{number_to_dial}@example.com" }
subject { OutboundCallController.new(mock_call) }
it "answers the call" do
allow(mock_call).to receive(:write_and_await_response)
expect(subject).to receive(:answer)
subject.run
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment