mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't use discourse.conf in test
This commit is contained in:
parent
79a17d5c22
commit
da5446a438
@ -102,15 +102,29 @@ class GlobalSetting
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class BlankProvider < BaseProvider
|
||||||
|
def lookup(key, default)
|
||||||
|
default
|
||||||
|
end
|
||||||
|
|
||||||
|
def keys
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
attr_accessor :provider
|
attr_accessor :provider
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@provider =
|
if Rails.env == "test"
|
||||||
FileProvider.from(File.expand_path('../../../config/discourse.conf', __FILE__)) ||
|
@provider = BlankProvider.new
|
||||||
EnvProvider.new
|
else
|
||||||
|
@provider =
|
||||||
|
FileProvider.from(File.expand_path('../../../config/discourse.conf', __FILE__)) ||
|
||||||
|
EnvProvider.new
|
||||||
|
end
|
||||||
|
|
||||||
load_defaults
|
load_defaults
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user