Skip to content

Instantly share code, notes, and snippets.

@benlangfeld
Created October 28, 2011 15:02
Show Gist options
  • Save benlangfeld/1322480 to your computer and use it in GitHub Desktop.
Save benlangfeld/1322480 to your computer and use it in GitHub Desktop.
* { :ruby => ruby-1.9.2-p290 }
/Users/ben/Developer/.rvm/gems/ruby-1.9.2-p290/bin/bundle exec rvm ruby-1.9.2-p290 ruby /Users/ben/Developer/.rvm/gems/ruby-1.9.2-p290/bin/rspec spec/punchblock/client_spec.rb
Using /Users/ben/Developer/.rvm/gems/ruby-1.9.2-p290
No examples were matched by {:focus=>true}, running all
Punchblock::Client
should handle connection events
event_queue
should be a kind of Queue
connection
should equal #<Punchblock::Connection::XMPP:0x000001016f16f0 @username="[email protected]", @client=#<Blather::Client:0x000001016f1560 @state=:initializing, @status=<presence/>, @handlers={:error=>[[[], #<Proc:0x000001016de820@/Users/ben/code/VoIP/adhearsion/punchblock/vendor/ruby/1.9.1/gems/blather-0.5.7/lib/blather/client/client.rb:222>]], :ping=>[[[{:type=>:get}], #<Proc:0x000001016de6b8@/Users/ben/code/VoIP/adhearsion/punchblock/vendor/ruby/1.9.1/gems/blather-0.5.7/lib/blather/client/client.rb:230>]], :status=>[[[], #<Proc:0x000001016de5a0@/Users/ben/code/VoIP/adhearsion/punchblock/vendor/ruby/1.9.1/gems/blather-0.5.7/lib/blather/client/client.rb:234>]], :roster=>[[[], #<Proc:0x000001016de438@/Users/ben/code/VoIP/adhearsion/punchblock/vendor/ruby/1.9.1/gems/blather-0.5.7/lib/blather/client/client.rb:239>]]}, @tmp_handlers={}, @filters={:before=>[], :after=>[]}, @roster=#<Blather::Roster:0x000001016f0250 @stream=#<Blather::Client:0x000001016f1560 ...>, @items={}>, @caps=<iq type="result" id="blather0003">
<query xmlns="http://jabber.org/protocol/disco#info" node="#2jmj7l5rSw0yVb/vlWAYkK/YBwk="/>
</iq>, @[email protected], @setup=[[email protected], 1]>, @rayo_domain="call.rayo.net", @callmap={}, @component_id_to_iq_id={}, @iq_id_to_command={}, @auto_reconnect=false, @reconnect_attempts=0, @write_timeout=3, @ping_period=60, @event_handler=#<Proc:0x000001016dd740@/Users/ben/code/VoIP/adhearsion/punchblock/lib/punchblock/client.rb:13 (lambda)>>
#run
should start up the connection
#handle_event
if event handlers have been set
should call the event handler and not queue up the event
if event handlers have not been set
should queue up the event
Finished in 0.44116 seconds
6 examples, 0 failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment