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:
Jean-Philippe Lang
2013-02-15 08:28:34 +00:00
parent 348a1d59ef
commit 4e9fbeb851
6 changed files with 45 additions and 5 deletions
+9 -1
View File
@@ -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