spec/punchblock/component/input_spec.rb in punchblock-0.8.0 vs spec/punchblock/component/input_spec.rb in punchblock-0.8.1
- old
+ new
@@ -190,9 +190,24 @@
its(:name) { should == :success }
its(:mode) { should == :speech }
its(:confidence) { should == 0.45 }
its(:interpretation) { should == '1234' }
its(:utterance) { should == 'one two three four' }
+
+ describe "when setting options in initializer" do
+ subject do
+ Input::Complete::Success.new :mode => :dtmf,
+ :confidence => 1,
+ :utterance => '123',
+ :interpretation => 'dtmf-1 dtmf-2 dtmf-3'
+ end
+
+
+ its(:mode) { should == :dtmf }
+ its(:confidence) { should == 1 }
+ its(:utterance) { should == '123' }
+ its(:interpretation) { should == 'dtmf-1 dtmf-2 dtmf-3' }
+ end
end
describe Input::Complete::NoMatch do
let :stanza do
<<-MESSAGE