Sha256: 42f3726e733f38a7adeb4752631519c1789118ce1d1fbcb24683581c78263c10
Contents?: true
Size: 755 Bytes
Versions: 2
Compression:
Stored size: 755 Bytes
Contents
require File.join(File.dirname(__FILE__), *%w[.. .. spec_helper]) describe 'Blather::Stanza::Presence' do it 'registers itself' do XMPPNode.class_from_registration(:presence, nil).must_equal Stanza::Presence end it 'ensures type is one of Stanza::Presence::VALID_TYPES' do presence = Stanza::Presence.new lambda { presence.type = :invalid_type_name }.must_raise(Blather::ArgumentError) Stanza::Presence::VALID_TYPES.each do |valid_type| presence.type = valid_type presence.type.must_equal valid_type end end Stanza::Presence::VALID_TYPES.each do |valid_type| it "provides a helper (#{valid_type}?) for type #{valid_type}" do Stanza::Presence.new.must_respond_to :"#{valid_type}?" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
blather-0.2.1 | spec/blather/stanza/presence_spec.rb |
blather-0.2 | spec/blather/stanza/presence_spec.rb |