diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-15 08:28:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-15 08:28:34 +0000 |
commit | 4e9fbeb8516581ddaf7a196f8dc0b710cbbce8aa (patch) | |
tree | 802754f9290459f930f24bd65f20edf2dda331bc /test/test_helper.rb | |
parent | 348a1d59efe207878384a75116bcc09928427556 (diff) | |
download | redmine-4e9fbeb8516581ddaf7a196f8dc0b710cbbce8aa.tar.gz redmine-4e9fbeb8516581ddaf7a196f8dc0b710cbbce8aa.zip |
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
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 410fe1f8a..368a4d41b 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -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 |