diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-02-25 14:30:05 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-02-25 14:30:05 +0000 |
commit | e1ad561cf652713bbdebe2d60fc4c680fb367ec1 (patch) | |
tree | c753c86d88606d80d698389ce20abf08c4ab7e7b /test/unit/lib/redmine/configuration_test.rb | |
parent | 2b80f4636177243276c30e8aa4edf1b204d9de61 (diff) | |
download | redmine-e1ad561cf652713bbdebe2d60fc4c680fb367ec1.tar.gz redmine-e1ad561cf652713bbdebe2d60fc4c680fb367ec1.zip |
Adds a method to temporarily override configuration settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4949 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib/redmine/configuration_test.rb')
-rw-r--r-- | test/unit/lib/redmine/configuration_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/configuration_test.rb b/test/unit/lib/redmine/configuration_test.rb index 239f2d3d4..d172c95f5 100644 --- a/test/unit/lib/redmine/configuration_test.rb +++ b/test/unit/lib/redmine/configuration_test.rb @@ -41,6 +41,15 @@ class Redmine::ConfigurationTest < ActiveSupport::TestCase assert_equal 'bar', @conf['somesetting'] end + def test_with + load_conf('default.yml', 'test') + assert_equal 'foo', @conf['somesetting'] + @conf.with 'somesetting' => 'bar' do + assert_equal 'bar', @conf['somesetting'] + end + assert_equal 'foo', @conf['somesetting'] + end + private def load_conf(file, env) |