Fixed random failures in RepositoriesControllerTest with ruby-1.8.7-p358.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8909 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cd9412fe52
commit
59c2530001
|
@ -169,6 +169,10 @@ private
|
||||||
name = name.to_s
|
name = name.to_s
|
||||||
raise "There's no setting named #{name}" unless @@available_settings.has_key?(name)
|
raise "There's no setting named #{name}" unless @@available_settings.has_key?(name)
|
||||||
setting = find_by_name(name)
|
setting = find_by_name(name)
|
||||||
setting ||= new(:name => name, :value => @@available_settings[name]['default']) if @@available_settings.has_key? name
|
unless setting
|
||||||
|
setting = new(:name => name)
|
||||||
|
setting.value = @@available_settings[name]['default']
|
||||||
|
end
|
||||||
|
setting
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue