spec/punchblock/event/complete_spec.rb in punchblock-1.2.0 vs spec/punchblock/event/complete_spec.rb in punchblock-1.3.0

- old
+ new

@@ -7,9 +7,19 @@ describe Complete do it 'registers itself' do RayoNode.class_from_registration(:complete, 'urn:xmpp:rayo:ext:1').should be == Complete end + describe "setting a reason" do + let(:reason) { Punchblock::Component::Asterisk::AGI::Command::Complete::Success.new } + + subject { described_class.new } + + before { subject.reason = reason } + + its(:reason) { should == reason } + end + describe "comparing for equality" do subject do Complete.new.tap do |c| c.reason = Complete::Stop.new c.target_call_id = '1234'