test/stanza/iq/disco_items_test.rb in vines-0.3.2 vs test/stanza/iq/disco_items_test.rb in vines-0.4.0
- old
+ new
@@ -1,7 +1,8 @@
# encoding: UTF-8
+require 'tmpdir'
require 'vines'
require 'ext/nokogiri'
require 'minitest/autorun'
class DiscoItemsTest < MiniTest::Unit::TestCase
@@ -22,18 +23,17 @@
</iq>
}.strip.gsub(/\n|\s{2,}/, ''))
config = Vines::Config.new do
host 'wonderland.lit' do
- storage(:fs) { dir '.' }
+ storage(:fs) { dir Dir.tmpdir }
components 'tea' => 'secr3t', 'cake' => 'passw0rd'
end
end
- @stream.expect(:config, config)
@stream.expect(:user, Vines::User.new(:jid => 'alice@wonderland.lit/home'))
- @stream.expect(:domain, 'wonderland.lit')
@stream.expect(:write, nil, [expected])
+ @stream.expect(:config, config)
stanza = Vines::Stanza::Iq::DiscoItems.new(node, @stream)
stanza.process
assert @stream.verify
end