diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2019-09-02 14:25:01 +0300 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2019-09-02 14:25:01 +0300 |
commit | 4925687ecbae7fdf04ab62d3cf822f508b6251c2 (patch) | |
tree | e43a008b9914c579ff0914cb22f8503217862414 | |
parent | 271de447483213eadbc422563dbac3100cc16fe2 (diff) |
Add StubConfiguration.stub_config method
-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 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) |