##// END OF EJS Templates
Restore settings even if a test failure occurs....
Jean-Philippe Lang -
r5107:3ef5daaf3518
parent child
Show More
@@ -87,6 +87,7 class ActiveSupport::TestCase
87 87 saved_settings = options.keys.inject({}) {|h, k| h[k] = Setting[k].dup; h}
88 88 options.each {|k, v| Setting[k] = v}
89 89 yield
90 ensure
90 91 saved_settings.each {|k, v| Setting[k] = v}
91 92 end
92 93
General Comments 0
You need to be logged in to leave comments. Login now