Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
0d0ca9829ddf
Commit
06ae4623
authored
Oct 04, 2018
by
Alejandro Rodríguez
Browse files
Require spec helpers loaded by other spec helpers first
parent
3f1790380e07
Changes
1
Hide whitespace changes
Inline
Side-by-side
spec/spec_helper.rb
View file @
0d0ca982
...
@@ -34,6 +34,11 @@
...
@@ -34,6 +34,11 @@
# Requires supporting ruby files with custom matchers and macros, etc,
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
# in spec/support/ and its subdirectories.
# Requires helpers, and shared contexts/examples first since they're used in other support files
# Requires helpers, and shared contexts/examples first since they're used in other support files
# Load these first since they may be required by other helpers
require
Rails
.
root
.
join
(
"spec/support/helpers/git_helpers.rb"
)
# Then the rest
Dir
[
Rails
.
root
.
join
(
"spec/support/helpers/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"spec/support/helpers/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"spec/support/shared_contexts/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"spec/support/shared_contexts/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"spec/support/shared_examples/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
Rails
.
root
.
join
(
"spec/support/shared_examples/*.rb"
)].
each
{
|
f
|
require
f
}
...
...
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