spec/blather/errors/stanza_error_spec.rb in blather-0.4.15 vs spec/blather/errors/stanza_error_spec.rb in blather-0.4.16
- old
+ new
@@ -1,12 +1,12 @@
-require File.expand_path "../../../spec_helper", __FILE__
+require 'spec_helper'
def stanza_error_node(type = 'cancel', error = 'internal-server-error', msg = nil)
node = Blather::Stanza::Message.new 'error@jabber.local', 'test message', :error
node << (error_node = Blather::XMPPNode.new('error'))
error_node['type'] = type.to_s
-
+
error_node << (err = Blather::XMPPNode.new(error, error_node.document))
err.namespace = 'urn:ietf:params:xml:ns:xmpp-stanzas'
if msg
error_node << (text = Blather::XMPPNode.new('text', error_node.document))