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
e5f02b4c
Commit
e5f02b4c
authored
Jun 22, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a EE::LicenseHelpers to easily enable/disable features
parent
7b4b22a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
spec/spec_helper.rb
spec/spec_helper.rb
+1
-0
spec/support/ee/license_helpers.rb
spec/support/ee/license_helpers.rb
+9
-0
No files found.
spec/spec_helper.rb
View file @
e5f02b4c
...
...
@@ -59,6 +59,7 @@ RSpec.configure do |config|
config
.
include
ApiHelpers
,
:api
config
.
include
Rails
.
application
.
routes
.
url_helpers
,
type: :routing
config
.
include
MigrationsHelpers
,
:migration
config
.
include
EE
::
LicenseHelpers
config
.
include
Rails
.
application
.
routes
.
url_helpers
,
type: :routing
config
.
infer_spec_type_from_file_location!
...
...
spec/support/ee/license_helpers.rb
0 → 100644
View file @
e5f02b4c
module
EE
module
LicenseHelpers
def
stub_feature
(
feature
,
enabled
=
true
)
allow
(
License
).
to
receive
(
:feature_available?
).
and_call_original
allow
(
License
).
to
receive
(
:feature_available?
).
with
(
feature
)
{
enabled
}
end
end
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