spec/punchblock/translator/asterisk_spec.rb in punchblock-0.7.1 vs spec/punchblock/translator/asterisk_spec.rb in punchblock-0.7.2

- old
+ new

@@ -1,20 +1,31 @@ require 'spec_helper' module Punchblock module Translator describe Asterisk do - let(:ami_client) { mock 'RubyAMI::Client' } - let(:connection) { mock 'Connection::Asterisk' } + let(:ami_client) { mock 'RubyAMI::Client' } + let(:connection) { mock 'Connection::Asterisk' } + let(:media_engine) { :asterisk } - let(:translator) { Asterisk.new ami_client, connection } + let(:translator) { Asterisk.new ami_client, connection, media_engine } subject { translator } its(:ami_client) { should be ami_client } its(:connection) { should be connection } after { translator.terminate } + + context 'with a configured media engine of :asterisk' do + let(:media_engine) { :asterisk } + its(:media_engine) { should == :asterisk } + end + + context 'with a configured media engine of :unimrcp' do + let(:media_engine) { :unimrcp } + its(:media_engine) { should == :unimrcp } + end describe '#execute_command' do describe 'with a call command' do let(:command) { Command::Answer.new } let(:call_id) { 'abc123' }