spec/blather/stanza/pubsub_owner_spec.rb in blather-1.2.0 vs spec/blather/stanza/pubsub_owner_spec.rb in blather-2.0.0

- old
+ new

@@ -1,27 +1,27 @@ require 'spec_helper' require 'fixtures/pubsub' describe Blather::Stanza::PubSubOwner do it 'registers itself' do - Blather::XMPPNode.class_from_registration(:pubsub, 'http://jabber.org/protocol/pubsub#owner').should == Blather::Stanza::PubSubOwner + expect(Blather::XMPPNode.class_from_registration(:pubsub, 'http://jabber.org/protocol/pubsub#owner')).to eq(Blather::Stanza::PubSubOwner) end it 'ensures a pubusb node is present on create' do pubsub = Blather::Stanza::PubSubOwner.new - pubsub.find_first('/iq/ns:pubsub', :ns => Blather::Stanza::PubSubOwner.registered_ns).should_not be_nil + expect(pubsub.find_first('/iq/ns:pubsub', :ns => Blather::Stanza::PubSubOwner.registered_ns)).not_to be_nil end it 'ensures a pubsub node exists when calling #pubsub' do pubsub = Blather::Stanza::PubSubOwner.new pubsub.remove_children :pubsub - pubsub.find_first('/iq/ns:pubsub', :ns => Blather::Stanza::PubSubOwner.registered_ns).should be_nil + expect(pubsub.find_first('/iq/ns:pubsub', :ns => Blather::Stanza::PubSubOwner.registered_ns)).to be_nil - pubsub.pubsub.should_not be_nil - pubsub.find_first('/iq/ns:pubsub', :ns => Blather::Stanza::PubSubOwner.registered_ns).should_not be_nil + expect(pubsub.pubsub).not_to be_nil + expect(pubsub.find_first('/iq/ns:pubsub', :ns => Blather::Stanza::PubSubOwner.registered_ns)).not_to be_nil end it 'sets the host if requested' do aff = Blather::Stanza::PubSubOwner.new :get, 'pubsub.jabber.local' - aff.to.should == Blather::JID.new('pubsub.jabber.local') + expect(aff.to).to eq(Blather::JID.new('pubsub.jabber.local')) end end