Sha256: ce8e7136b628efb4aa77e25ba4f482a0e4fea2dcded8cf55e4d5296018177464

Contents?: true

Size: 968 Bytes

Versions: 23

Compression:

Stored size: 968 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

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

        it { should be_instance_of Unjoined }

        it_should_behave_like 'event'

        its(:call_id)     { should be == 'b' }
        its(:mixer_name)  { should be == 'm' }
        its(:xmlns)       { should be == 'urn:xmpp:rayo:1' }
      end

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

        its(:call_id)     { should be == 'abc123' }
        its(:mixer_name)  { should be == 'blah' }
      end
    end
  end
end # Punchblock

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
punchblock-1.9.4 spec/punchblock/event/unjoined_spec.rb
punchblock-1.9.3 spec/punchblock/event/unjoined_spec.rb
punchblock-1.9.2 spec/punchblock/event/unjoined_spec.rb
punchblock-1.9.1 spec/punchblock/event/unjoined_spec.rb
punchblock-1.9.0 spec/punchblock/event/unjoined_spec.rb
punchblock-1.8.2 spec/punchblock/event/unjoined_spec.rb
punchblock-1.8.1 spec/punchblock/event/unjoined_spec.rb
punchblock-1.8.0 spec/punchblock/event/unjoined_spec.rb
punchblock-1.7.1 spec/punchblock/event/unjoined_spec.rb
punchblock-1.7.0 spec/punchblock/event/unjoined_spec.rb
punchblock-1.6.1 spec/punchblock/event/unjoined_spec.rb
punchblock-1.6.0 spec/punchblock/event/unjoined_spec.rb
punchblock-1.5.3 spec/punchblock/event/unjoined_spec.rb
punchblock-1.5.2 spec/punchblock/event/unjoined_spec.rb
punchblock-1.5.1 spec/punchblock/event/unjoined_spec.rb
punchblock-1.5.0 spec/punchblock/event/unjoined_spec.rb
punchblock-1.4.1 spec/punchblock/event/unjoined_spec.rb
punchblock-1.4.0 spec/punchblock/event/unjoined_spec.rb
punchblock-1.3.0 spec/punchblock/event/unjoined_spec.rb
punchblock-1.2.0 spec/punchblock/event/unjoined_spec.rb