]> source.dussan.org Git - redmine.git/commitdiff
Restore settings even if a test failure occurs.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 27 Mar 2011 15:41:05 +0000 (15:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 27 Mar 2011 15:41:05 +0000 (15:41 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5227 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/test_helper.rb

index ea47670c049089a74079d01b87319a779779790d..e8474de155071cd6e3dd64498063e03553c63f3f 100644 (file)
@@ -87,6 +87,7 @@ class ActiveSupport::TestCase
     saved_settings = options.keys.inject({}) {|h, k| h[k] = Setting[k].dup; h}
     options.each {|k, v| Setting[k] = v}
     yield
+  ensure
     saved_settings.each {|k, v| Setting[k] = v}
   end