Sha256: dfb8076adb5723886c713763263be0a599a15fb5aead25defa1f3e67a8585f90

Contents?: true

Size: 943 Bytes

Versions: 11

Compression:

Stored size: 943 Bytes

Contents

require 'spec_helper'

module Punchblock
  class Event
    describe Unjoined do
      it 'registers itself' do
        RayoNode.class_from_registration(:unjoined, 'urn:xmpp:rayo:1').should == Unjoined
      end

      describe "from a stanza" do
        let(:stanza) { '<unjoined xmlns="urn:xmpp:rayo:1" call-id="b" mixer-id="m" />' }

        subject { RayoNode.import parse_stanza(stanza).root, '9f00061', '1' }

        it { should be_instance_of Unjoined }

        it_should_behave_like 'event'

        its(:other_call_id) { should == 'b' }
        its(:mixer_id)      { should == 'm' }
        its(:xmlns)         { should == 'urn:xmpp:rayo:1' }
      end

      describe "when setting options in initializer" do
        subject { Unjoined.new :other_call_id => 'abc123', :mixer_id => 'blah' }

        its(:other_call_id) { should == 'abc123' }
        its(:mixer_id)      { should == 'blah' }
      end
    end
  end
end # Punchblock

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
punchblock-0.7.1 spec/punchblock/event/unjoined_spec.rb
punchblock-0.7.0 spec/punchblock/event/unjoined_spec.rb
punchblock-0.6.2 spec/punchblock/event/unjoined_spec.rb
punchblock-0.6.1 spec/punchblock/event/unjoined_spec.rb
punchblock-0.6.0 spec/punchblock/event/unjoined_spec.rb
punchblock-0.5.1 spec/punchblock/event/unjoined_spec.rb
punchblock-0.5.0 spec/punchblock/event/unjoined_spec.rb
punchblock-0.4.3 spec/punchblock/event/unjoined_spec.rb
punchblock-0.4.2 spec/punchblock/event/unjoined_spec.rb
punchblock-0.4.1 spec/punchblock/event/unjoined_spec.rb
punchblock-0.4.0 spec/punchblock/event/unjoined_spec.rb