test/soap/calc/test_calc.rb in soap4r-1.5.7 vs test/soap/calc/test_calc.rb in soap4r-1.5.8
- old
+ new
@@ -23,13 +23,15 @@
@calc.add_method('multi', 'lhs', 'rhs')
@calc.add_method('div', 'lhs', 'rhs')
end
def teardown
- @server.shutdown
- @t.kill
- @t.join
- @calc.reset_stream
+ @server.shutdown if @server
+ if @t
+ @t.kill
+ @t.join
+ end
+ @calc.reset_stream if @calc
end
def test_calc
assert_equal(3, @calc.add(1, 2))
assert_equal(-1.1, @calc.sub(1.1, 2.2))