Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3461e5c1
Commit
3461e5c1
authored
Jun 27, 2017
by
Bob Van Landuyt
Committed by
Bob Van Landuyt
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow stubbing application configuration despite prepended module
parent
50158604
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
spec/support/stub_configuration.rb
spec/support/stub_configuration.rb
+10
-0
No files found.
spec/support/stub_configuration.rb
View file @
3461e5c1
...
...
@@ -9,6 +9,16 @@ module StubConfiguration
.
to
receive_messages
(
messages
)
end
def
stub_application_setting_on_object
(
object
,
messages
)
add_predicates
(
messages
)
allow
(
Gitlab
::
CurrentSettings
.
current_application_settings
)
.
to
receive_messages
(
messages
)
messages
.
each
do
|
setting
,
value
|
allow
(
object
).
to
receive_message_chain
(
:current_application_settings
,
setting
)
{
value
}
end
end
def
stub_config_setting
(
messages
)
allow
(
Gitlab
.
config
.
gitlab
).
to
receive_messages
(
messages
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment