spec/adhearsion/call_controller/output/player_spec.rb in adhearsion-2.2.0 vs spec/adhearsion/call_controller/output/player_spec.rb in adhearsion-2.2.1
- old
+ new
@@ -1,8 +1,9 @@
# encoding: utf-8
require 'spec_helper'
+require 'ruby_speech'
module Adhearsion
class CallController
module Output
describe Player do
@@ -42,13 +43,12 @@
it "raises a Playback Error if the component ends due to an error" do
expect_component_execution Punchblock::Component::Output.new(:ssml => content), Adhearsion::Error
lambda { subject.output content }.should raise_error(PlaybackError)
end
- it "raises a Playback Error if the component ends due to an error" do
- e = Call::Hangup.new
- expect_component_execution Punchblock::Component::Output.new(:ssml => content), e
- lambda { subject.output content }.should raise_error(e)
+ it "raises a Call::Hangup exception if the component ends due to an error" do
+ expect_component_execution Punchblock::Component::Output.new(:ssml => content), Call::Hangup
+ lambda { subject.output content }.should raise_error(Call::Hangup)
end
end
describe "#play_ssml" do
let(:ssml) { RubySpeech::SSML.draw { string "BOO" } }