From a3bebdafa022ce2c836ae742df37057547612879 Mon Sep 17 00:00:00 2001 From: Alex Reisner <alex@alexreisner.com> Date: Tue, 29 Nov 2011 12:52:41 -0500 Subject: [PATCH] Use teardown for resetting array after each test. --- test/error_handling_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/error_handling_test.rb b/test/error_handling_test.rb index 42b3c3fd..ca4cec56 100644 --- a/test/error_handling_test.rb +++ b/test/error_handling_test.rb @@ -3,6 +3,10 @@ require 'test_helper' class ErrorHandlingTest < Test::Unit::TestCase + def teardown + Geocoder::Configuration.always_raise = [] + end + def test_does_not_choke_on_timeout # keep test output clean: suppress timeout warning orig = $VERBOSE; $VERBOSE = nil @@ -21,7 +25,6 @@ class ErrorHandlingTest < Test::Unit::TestCase lookup.send(:results, "timeout") end end - Geocoder::Configuration.always_raise = [] end def test_always_raise_socket_error @@ -32,6 +35,5 @@ class ErrorHandlingTest < Test::Unit::TestCase lookup.send(:results, "socket_error") end end - Geocoder::Configuration.always_raise = [] end end -- GitLab