comparison test/unit/lib/redmine/configuration_test.rb @ 245:051f544170fe

* Update to SVN trunk revision 4993
author Chris Cannam
date Thu, 03 Mar 2011 11:42:28 +0000
parents 0579821a129a
children cbb26bc654de
comparison
equal deleted inserted replaced
244:8972b600f4fb 245:051f544170fe
39 def test_overrides 39 def test_overrides
40 assert_kind_of Hash, load_conf('overrides.yml', 'test') 40 assert_kind_of Hash, load_conf('overrides.yml', 'test')
41 assert_equal 'bar', @conf['somesetting'] 41 assert_equal 'bar', @conf['somesetting']
42 end 42 end
43 43
44 def test_with
45 load_conf('default.yml', 'test')
46 assert_equal 'foo', @conf['somesetting']
47 @conf.with 'somesetting' => 'bar' do
48 assert_equal 'bar', @conf['somesetting']
49 end
50 assert_equal 'foo', @conf['somesetting']
51 end
52
44 private 53 private
45 54
46 def load_conf(file, env) 55 def load_conf(file, env)
47 @conf.load( 56 @conf.load(
48 :file => File.join(Rails.root, 'test', 'fixtures', 'configuration', file), 57 :file => File.join(Rails.root, 'test', 'fixtures', 'configuration', file),