diff --git a/spec/adhearsion-ivr/ivr_controller_spec.rb b/spec/adhearsion-ivr/ivr_controller_spec.rb index e03caf3..87be47c 100644 --- a/spec/adhearsion-ivr/ivr_controller_spec.rb +++ b/spec/adhearsion-ivr/ivr_controller_spec.rb @@ -685,6 +685,9 @@ def grammar prompts << -> { 'first' } # Bargeable prompts << -> { 'second' } # Unbargeable prompts << -> { self.barge true; 'third' } # Bargeable + prompts << -> { 'fourth' } # Unbargeable + + max_attempts 4 on_complete do |result| say "Let's go to #{result.utterance}" @@ -699,7 +702,8 @@ def grammar it 'allows interruption of each prompt correctly' do controller.should_receive(:ask).once.with('first', grammar: :some_grammar, mode: :voice, interruptible: true).and_return noinput_result controller.should_receive(:ask).once.with('second', grammar: :some_grammar, mode: :voice, interruptible: false).and_return noinput_result - controller.should_receive(:ask).once.with('third', grammar: :some_grammar, mode: :voice, interruptible: true).and_return match_result + controller.should_receive(:ask).once.with('third', grammar: :some_grammar, mode: :voice, interruptible: true).and_return noinput_result + controller.should_receive(:ask).once.with('fourth', grammar: :some_grammar, mode: :voice, interruptible: false).and_return match_result controller.should_receive(:say).once.with "Let's go to Paris" controller.run end