require 'spec_helper' module Punchblock class Event describe Ringing do it 'registers itself' do RayoNode.class_from_registration(:ringing, 'urn:xmpp:rayo:1').should == Ringing end describe "from a stanza" do let(:stanza) { '' } subject { RayoNode.import parse_stanza(stanza).root, '9f00061', '1' } it { should be_instance_of Ringing } it_should_behave_like 'event' its(:xmlns) { should == 'urn:xmpp:rayo:1' } end end end end # Punchblock