Commit f3ffbec7 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang Committed by Eric Davis

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
parent c0d55c93
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment