mirror of
https://github.com/redmine/redmine.git
synced 2026-06-20 02:30:26 +02:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user