Skip to content

Commit

Permalink
Per-prompt barge resets to global value
Browse files Browse the repository at this point in the history
  • Loading branch information
benlangfeld committed May 1, 2015
1 parent c7ec557 commit f357c79
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/adhearsion-ivr/ivr_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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
Expand Down

0 comments on commit f357c79

Please sign in to comment.