spec/blather/stanza/discos/disco_info_spec.rb in blather-0.4.15 vs spec/blather/stanza/discos/disco_info_spec.rb in blather-0.4.16
- old
+ new
@@ -1,6 +1,6 @@
-require File.expand_path "../../../../spec_helper", __FILE__
+require 'spec_helper'
def disco_info_xml
<<-XML
<iq type='result'
from='romeo@montague.net/orchard'
@@ -217,15 +217,10 @@
n.xml_lang.must_equal 'en'
n.xml_lang = 'de'
n.xml_lang.must_equal 'de'
end
- it 'raises an error if equality is sent a non DiscoInfo::Identity object' do
- a = Blather::Stanza::Iq::DiscoInfo::Identity.new(*%w[name type cat])
- lambda { a == 'foo' }.must_raise RuntimeError
- end
-
it 'can determine equality' do
a = Blather::Stanza::Iq::DiscoInfo::Identity.new(*%w[name type cat])
a.must_equal Blather::Stanza::Iq::DiscoInfo::Identity.new(*%w[name type cat])
a.wont_equal Blather::Stanza::Iq::DiscoInfo::Identity.new(*%w[not-name not-type not-cat])
end
@@ -241,14 +236,9 @@
it 'has a var attribute' do
n = Blather::Stanza::Iq::DiscoInfo::Feature.new 'var'
n.var.must_equal 'var'
n.var = :foo
n.var.must_equal 'foo'
- end
-
- it 'raises an error if equality is sent a non DiscoInfo::Feature object' do
- a = Blather::Stanza::Iq::DiscoInfo::Feature.new('var')
- lambda { a == 'foo' }.must_raise RuntimeError
end
it 'can determine equality' do
a = Blather::Stanza::Iq::DiscoInfo::Feature.new('var')
a.must_equal Blather::Stanza::Iq::DiscoInfo::Feature.new('var')