spec/punchblock/translator/freeswitch/call_spec.rb in punchblock-1.9.1 vs spec/punchblock/translator/freeswitch/call_spec.rb in punchblock-1.9.2

- old
+ new

@@ -342,11 +342,11 @@ let(:cause) { 'ORIGINATOR_CANCEL' } it "should cause the actor to be terminated" do translator.should_receive(:handle_pb_event).once subject.handle_es_event es_event - sleep 5.5 + sleep 0.25 subject.should_not be_alive end it "de-registers the call from the translator" do translator.stub :handle_pb_event @@ -780,11 +780,11 @@ let(:media_engine) { media_engine } context "with a media engine of #{media_engine}" do it 'should create an Output component and execute it asynchronously' do Component::Output.should_receive(:new_link).once.with(command, subject).and_return mock_component - mock_component.async.should_receive(:execute).once + mock_component.should_receive(:execute).once subject.execute_command command subject.component_with_id(mock_component.id).should be mock_component end end end @@ -792,33 +792,33 @@ context 'with the media engine of :flite' do let(:media_engine) { :flite } it 'should create a FliteOutput component and execute it asynchronously using flite and the calls default voice' do Component::FliteOutput.should_receive(:new_link).once.with(command, subject).and_return mock_component - mock_component.async.should_receive(:execute).once.with(media_engine, default_voice) + mock_component.should_receive(:execute).once.with(media_engine, default_voice) subject.execute_command command subject.component_with_id(mock_component.id).should be mock_component end end context 'with the media engine of :cepstral' do let(:media_engine) { :cepstral } it 'should create a TTSOutput component and execute it asynchronously using cepstral and the calls default voice' do Component::TTSOutput.should_receive(:new_link).once.with(command, subject).and_return mock_component - mock_component.async.should_receive(:execute).once.with(media_engine, default_voice) + mock_component.should_receive(:execute).once.with(media_engine, default_voice) subject.execute_command command subject.component_with_id(mock_component.id).should be mock_component end end context 'with the media engine of :unimrcp' do let(:media_engine) { :unimrcp } it 'should create a TTSOutput component and execute it asynchronously using unimrcp and the calls default voice' do Component::TTSOutput.should_receive(:new_link).once.with(command, subject).and_return mock_component - mock_component.async.should_receive(:execute).once.with(media_engine, default_voice) + mock_component.should_receive(:execute).once.with(media_engine, default_voice) subject.execute_command command subject.component_with_id(mock_component.id).should be mock_component end end @@ -829,11 +829,11 @@ Punchblock::Component::Output.new :renderer => media_renderer end it "should use the component media engine and not the platform one if it is set" do Component::Output.should_receive(:new_link).once.with(command_with_renderer, subject).and_return mock_component - mock_component.async.should_receive(:execute).once + mock_component.should_receive(:execute).once subject.execute_command command_with_renderer subject.component_with_id(mock_component.id).should be mock_component end end end @@ -845,11 +845,11 @@ let(:mock_component) { Translator::Freeswitch::Component::Input.new(command, subject) } it 'should create an Input component and execute it asynchronously' do Component::Input.should_receive(:new_link).once.with(command, subject).and_return mock_component - mock_component.async.should_receive(:execute).once + mock_component.should_receive(:execute).once subject.execute_command command end end context 'with a Record component' do @@ -859,10 +859,10 @@ let(:mock_component) { Translator::Freeswitch::Component::Record.new(command, subject) } it 'should create a Record component and execute it asynchronously' do Component::Record.should_receive(:new_link).once.with(command, subject).and_return mock_component - mock_component.async.should_receive(:execute).once + mock_component.should_receive(:execute).once subject.execute_command command end end context 'with a component command' do