42b643f057
There were several specs that were failing when run by themselves. - Use the `helper` object, as per RSpec 3 standards - Use `assign` to assign instance variables that helpers expect - Add `StubConfiguration` support module
14 lines
391 B
Ruby
14 lines
391 B
Ruby
module StubConfiguration
|
|
def stub_application_setting(messages)
|
|
allow(Gitlab::CurrentSettings.current_application_settings).
|
|
to receive_messages(messages)
|
|
end
|
|
|
|
def stub_config_setting(messages)
|
|
allow(Gitlab.config.gitlab).to receive_messages(messages)
|
|
end
|
|
|
|
def stub_gravatar_setting(messages)
|
|
allow(Gitlab.config.gravatar).to receive_messages(messages)
|
|
end
|
|
end
|