spec/punchblock/event/complete_spec.rb in punchblock-0.9.2 vs spec/punchblock/event/complete_spec.rb in punchblock-0.10.0

- old
+ new

@@ -1,12 +1,14 @@ +# encoding: utf-8 + require 'spec_helper' module Punchblock class Event describe Complete do it 'registers itself' do - RayoNode.class_from_registration(:complete, 'urn:xmpp:rayo:ext:1').should == Complete + RayoNode.class_from_registration(:complete, 'urn:xmpp:rayo:ext:1').should be == Complete end describe "comparing for equality" do subject do Complete.new.tap do |c| @@ -28,41 +30,41 @@ let(:reason) { Complete::Stop.new } let(:call_id) { '1234' } let(:component_id) { 'abcd' } it "should be equal" do - subject.should == other_complete + subject.should be == other_complete end end context 'with a different reason' do let(:reason) { Complete::Hangup.new } let(:call_id) { '1234' } let(:component_id) { 'abcd' } it "should not be equal" do - subject.should_not == other_complete + subject.should_not be == other_complete end end context 'with a different call id' do let(:reason) { Complete::Stop.new } let(:call_id) { '5678' } let(:component_id) { 'abcd' } it "should not be equal" do - subject.should_not == other_complete + subject.should_not be == other_complete end end context 'with a different component id' do let(:reason) { Complete::Stop.new } let(:call_id) { '1234' } let(:component_id) { 'efgh' } it "should not be equal" do - subject.should_not == other_complete + subject.should_not be == other_complete end end end describe "from a stanza" do @@ -95,11 +97,11 @@ subject { RayoNode.import(parse_stanza(stanza).root).reason } it { should be_instance_of Complete::Stop } - its(:name) { should == :stop } + its(:name) { should be == :stop } end describe Complete::Hangup do let :stanza do <<-MESSAGE @@ -111,11 +113,11 @@ subject { RayoNode.import(parse_stanza(stanza).root).reason } it { should be_instance_of Complete::Hangup } - its(:name) { should == :hangup } + its(:name) { should be == :hangup } end describe Complete::Error do let :stanza do <<-MESSAGE @@ -129,18 +131,18 @@ subject { RayoNode.import(parse_stanza(stanza).root).reason } it { should be_instance_of Complete::Error } - its(:name) { should == :error } - its(:details) { should == "Something really bad happened" } + its(:name) { should be == :error } + its(:details) { should be == "Something really bad happened" } describe "when setting options in initializer" do subject do Complete::Error.new :details => 'Ooops' end - its(:details) { should == 'Ooops' } + its(:details) { should be == 'Ooops' } end end end end # Punchblock