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
3fee9c44
Commit
3fee9c44
authored
Jun 14, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract spec_helper.rb into ee/spec/spec_helper.rb
parent
636b7cab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
25 deletions
+22
-25
ee/spec/spec_helper.rb
ee/spec/spec_helper.rb
+21
-0
spec/spec_helper.rb
spec/spec_helper.rb
+1
-25
No files found.
ee/spec/spec_helper.rb
0 → 100644
View file @
3fee9c44
Dir
[
Rails
.
root
.
join
(
"ee/spec/support/helpers/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"ee/spec/support/shared_contexts/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"ee/spec/support/shared_examples/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"ee/spec/support/**/*.rb"
)].
each
{
|
f
|
require
f
}
RSpec
.
configure
do
|
config
|
config
.
include
EE
::
LicenseHelpers
config
.
before
(
:all
)
do
License
.
destroy_all
TestLicense
.
init
end
config
.
around
(
:each
,
:geo
)
do
|
example
|
example
.
run
if
Gitlab
::
Database
.
postgresql?
end
config
.
around
(
:each
,
:geo_tracking_db
)
do
|
example
|
example
.
run
if
Gitlab
::
Geo
.
geo_database_configured?
end
end
spec/spec_helper.rb
View file @
3fee9c44
...
...
@@ -30,12 +30,7 @@ end
# require rainbow gem String monkeypatch, so we can test SystemChecks
require
'rainbow/ext/string'
# EE specific support START
Dir
[
Rails
.
root
.
join
(
"ee/spec/support/helpers/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"ee/spec/support/shared_contexts/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"ee/spec/support/shared_examples/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"ee/spec/support/**/*.rb"
)].
each
{
|
f
|
require
f
}
# EE specific support END
require_relative
'../ee/spec/spec_helper'
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
...
...
@@ -94,11 +89,7 @@ RSpec.configure do |config|
config
.
include
LiveDebugger
,
:js
config
.
include
MigrationsHelpers
,
:migration
config
.
include
RedisHelpers
# EE only START
config
.
include
EE
::
LicenseHelpers
config
.
include
Rails
.
application
.
routes
.
url_helpers
,
type: :routing
# EE only END
if
ENV
[
'CI'
]
# This includes the first try, i.e. tests will be run 4 times before failing.
...
...
@@ -114,13 +105,6 @@ RSpec.configure do |config|
TestEnv
.
init
end
# EE-specific start
config
.
before
(
:all
)
do
License
.
destroy_all
TestLicense
.
init
end
# EE-specific stop
config
.
after
(
:all
)
do
TestEnv
.
clean_test_path
end
...
...
@@ -215,14 +199,6 @@ RSpec.configure do |config|
example
.
run
if
Group
.
supports_nested_groups?
end
config
.
around
(
:each
,
:geo
)
do
|
example
|
example
.
run
if
Gitlab
::
Database
.
postgresql?
end
config
.
around
(
:each
,
:geo_tracking_db
)
do
|
example
|
example
.
run
if
Gitlab
::
Geo
.
geo_database_configured?
end
config
.
around
(
:each
,
:postgresql
)
do
|
example
|
example
.
run
if
Gitlab
::
Database
.
postgresql?
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