Possibility to define the default enable trackers when creating a project (#13175).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11394 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+9
-1
@@ -87,7 +87,15 @@ class ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
def with_settings(options, &block)
|
||||
saved_settings = options.keys.inject({}) {|h, k| h[k] = Setting[k].is_a?(Symbol) ? Setting[k] : Setting[k].dup; h}
|
||||
saved_settings = options.keys.inject({}) do |h, k|
|
||||
h[k] = case Setting[k]
|
||||
when Symbol, false, true, nil
|
||||
Setting[k]
|
||||
else
|
||||
Setting[k].dup
|
||||
end
|
||||
h
|
||||
end
|
||||
options.each {|k, v| Setting[k] = v}
|
||||
yield
|
||||
ensure
|
||||
|
||||
Reference in New Issue
Block a user