diff options
author | rpereira2 <rpereira@gitlab.com> | 2019-08-23 16:55:26 +0530 |
---|---|---|
committer | rpereira2 <rpereira@gitlab.com> | 2019-08-23 17:23:01 +0530 |
commit | edb0cd080f98cfa96ddbca665a7a9c34bf62fbcc (patch) | |
tree | d237a1c37f13f361abe94ab16f44216b788bc1d2 /spec/support/helpers | |
parent | e4050e17c0c7ed6c057bad4d6176103159233062 (diff) | |
download | gitlab-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.rb | 4 |
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) |