Permalink
Browse files

Implement a default finish key of hash.

  • Loading branch information...
1 parent daa3bb7 commit 4dfc114119fc1ca2132e3a6095a398e20de96ad2 Jon Gilbraith committed Mar 13, 2013
Showing with 8 additions and 1 deletion.
  1. +1 −1 lib/twilio-test-toolkit/call_scope.rb
  2. +7 −0 spec/requests/call_scope_spec.rb
@@ -86,7 +86,7 @@ def gather_method
def gather_finish_on_key
raise "Not a gather" unless gather?
- return @xml["finishOnKey"]
+ return @xml["finishOnKey"] || '#' # '#' is the default finish key if not specified
end
def press(digits)
@@ -246,6 +246,13 @@
# We should still be on the same page
@call.current_path.should == test_start_twilio_index_path
end
+
+ it "should respond to the default finish key of hash" do
+ @call.within_gather do |gather|
+ gather.press "98765#"
+ end
+ @call.should have_say "You entered 98765."
+ end
end
describe "with finishOnKey specified" do

0 comments on commit 4dfc114

Please sign in to comment.