test/soap/swa/test_file.rb in soap4r-1.5.7 vs test/soap/swa/test_file.rb in soap4r-1.5.8
- old
+ new
@@ -39,13 +39,15 @@
@client.add_method('put_file', 'name', 'file')
@client.wiredump_dev = STDERR if $DEBUG
end
def teardown
- @server.shutdown
- @t.kill
- @t.join
- @client.reset_stream
+ @server.shutdown if @server
+ if @t
+ @t.kill
+ @t.join
+ end
+ @client.reset_stream if @client
end
def test_get_file
assert_equal(
File.open(THIS_FILE) { |f| f.read },