Commit 3461e5c1 authored by Bob Van Landuyt's avatar Bob Van Landuyt Committed by Bob Van Landuyt

Allow stubbing application configuration despite prepended module

parent 50158604
......@@ -9,6 +9,16 @@ module StubConfiguration
.to receive_messages(messages)
end
def stub_application_setting_on_object(object, messages)
add_predicates(messages)
allow(Gitlab::CurrentSettings.current_application_settings)
.to receive_messages(messages)
messages.each do |setting, value|
allow(object).to receive_message_chain(:current_application_settings, setting) { value }
end
end
def stub_config_setting(messages)
allow(Gitlab.config.gitlab).to receive_messages(messages)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment