gitlab-org--gitlab-foss/spec/support/stub_configuration.rb
Robert Speicher 42b643f057 Fix ApplicationHelper specs
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
2015-06-30 17:47:53 -04:00

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