summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-27 15:41:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-27 15:41:05 +0000
commit3ef5daaf35185cf20a79ca38334abe0074f58549 (patch)
treec76896fbe00d56c38926f830cf8f0ea1e3eb28f2 /test/test_helper.rb
parent4f9d3f80c4f3910110235372647c1098769ffc62 (diff)
downloadredmine-3ef5daaf35185cf20a79ca38334abe0074f58549.tar.gz
redmine-3ef5daaf35185cf20a79ca38334abe0074f58549.zip
Restore settings even if a test failure occurs.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5227 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index ea47670c0..e8474de15 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -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