summaryrefslogtreecommitdiff
path: root/spec/support/helpers
diff options
context:
space:
mode:
authorrpereira2 <rpereira@gitlab.com>2019-08-23 16:55:26 +0530
committerrpereira2 <rpereira@gitlab.com>2019-08-23 17:23:01 +0530
commitedb0cd080f98cfa96ddbca665a7a9c34bf62fbcc (patch)
treed237a1c37f13f361abe94ab16f44216b788bc1d2 /spec/support/helpers
parente4050e17c0c7ed6c057bad4d6176103159233062 (diff)
downloadgitlab-ce-56883-migration.tar.gz
Create a stub_config spec helper and use it56883-migration
- Also correct Migrateable to Migratable. - Use stub_application_setting in migration spec.
Diffstat (limited to 'spec/support/helpers')
-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 c8b2bf040e6..dec7898d8d2 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)