mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 01:23:38 +08:00
eliminate cross talk in site setting test
This commit is contained in:
parent
21402d9d9e
commit
a4b96adfc5
|
@ -4,22 +4,27 @@ require_dependency 'site_settings/local_process_provider'
|
||||||
|
|
||||||
describe SiteSettingExtension do
|
describe SiteSettingExtension do
|
||||||
|
|
||||||
class FakeSettings
|
|
||||||
extend SiteSettingExtension
|
let :provider do
|
||||||
self.provider = SiteSettings::LocalProcessProvider.new
|
SiteSettings::LocalProcessProvider.new
|
||||||
end
|
end
|
||||||
|
|
||||||
class FakeSettings2
|
def new_settings(provider)
|
||||||
extend SiteSettingExtension
|
c = Class.new
|
||||||
self.provider = FakeSettings.provider
|
c.class_eval do
|
||||||
|
extend SiteSettingExtension
|
||||||
|
self.provider = provider
|
||||||
|
end
|
||||||
|
|
||||||
|
c
|
||||||
end
|
end
|
||||||
|
|
||||||
let :settings do
|
let :settings do
|
||||||
FakeSettings
|
new_settings(provider)
|
||||||
end
|
end
|
||||||
|
|
||||||
let :settings2 do
|
let :settings2 do
|
||||||
FakeSettings2
|
new_settings(provider)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "refresh!" do
|
describe "refresh!" do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user