Sha256: 7870ec506d796b0b10a90a692bbb378889c36efb76c33af99624d0335072c893
Contents?: true
Size: 833 Bytes
Versions: 10
Compression:
Stored size: 833 Bytes
Contents
require 'spec_helper' module Punchblock class Event describe End do it 'registers itself' do RayoNode.class_from_registration(:end, 'urn:xmpp:rayo:1').should == End end describe "from a stanza" do let :stanza do <<-MESSAGE <end xmlns="urn:xmpp:rayo:1"> <timeout /> </end> MESSAGE end subject { RayoNode.import parse_stanza(stanza).root, '9f00061', '1' } it { should be_instance_of End } it_should_behave_like 'event' its(:reason) { should == :timeout } its(:xmlns) { should == 'urn:xmpp:rayo:1' } end describe "when setting options in initializer" do subject do End.new :reason => :hangup end its(:reason) { should == :hangup } end end end end # Punchblock
Version data entries
10 entries across 10 versions & 1 rubygems