Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-09-02 14:25:01 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2019-09-02 14:25:01 +0300
commit4925687ecbae7fdf04ab62d3cf822f508b6251c2 (patch)
treee43a008b9914c579ff0914cb22f8503217862414
parent271de447483213eadbc422563dbac3100cc16fe2 (diff)
Add StubConfiguration.stub_config method
-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)