discourse/spec/support/site_settings_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
417 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
module SiteSettingsHelpers
def new_settings(provider)
Class.new do
extend SiteSettingExtension
# we want to avoid leaking a big pile of MessageBus subscriptions here (1 per class)
# so we set listen_for_changes to false
self.listen_for_changes = false
self.provider = provider
def self.setting(*args)
super
end
end
end
end