summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Jarvis <jarv@gitlab.com>2019-09-02 12:18:10 +0000
committerJohn Jarvis <jarv@gitlab.com>2019-09-02 12:18:10 +0000
commitc838459f836972f6e181db50032e57eb843cff98 (patch)
treee43a008b9914c579ff0914cb22f8503217862414
parent271de447483213eadbc422563dbac3100cc16fe2 (diff)
parent4925687ecbae7fdf04ab62d3cf822f508b6251c2 (diff)
downloadgitlab-ce-c838459f836972f6e181db50032e57eb843cff98.tar.gz
Merge branch 'ashmckenzie/12-2-stable-patch-4-add-stub-config' into '12-2-stable-patch-4'
Add StubConfiguration.stub_config method See merge request gitlab-org/gitlab-ce!32530
-rw-r--r--spec/support/helpers/stub_configuration.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/helpers/stub_configuration.rb b/spec/support/helpers/stub_configuration.rb
index 54e12b8b4e0..f364e4fd158 100644
--- a/spec/support/helpers/stub_configuration.rb
+++ b/spec/support/helpers/stub_configuration.rb
@@ -30,6 +30,10 @@ module StubConfiguration
allow(Gitlab.config.gitlab).to receive_messages(to_settings(messages))
end
+ def stub_config(messages)
+ allow(Gitlab.config).to receive_messages(to_settings(messages))
+ end
+
def stub_default_url_options(host: "localhost", protocol: "http")
url_options = { host: host, protocol: protocol }
allow(Rails.application.routes).to receive(:default_url_options).and_return(url_options)