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
18c3a0b4
Commit
18c3a0b4
authored
Aug 15, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
4169b637
fe0ab065
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
doc/development/testing_guide/best_practices.md
doc/development/testing_guide/best_practices.md
+1
-0
spec/spec_helper.rb
spec/spec_helper.rb
+3
-0
No files found.
doc/development/testing_guide/best_practices.md
View file @
18c3a0b4
...
...
@@ -70,6 +70,7 @@ bundle exec rspec spec/[path]/[to]/[spec].rb
-
On
`before`
and
`after`
hooks, prefer it scoped to
`:context`
over
`:all`
-
When using
`evaluate_script("$('.js-foo').testSomething()")`
(or
`execute_script`
) which acts on a given element,
use a Capyabara matcher beforehand (e.g.
`find('.js-foo')`
) to ensure the element actually exists.
-
Use
`focus: true`
to isolate parts of the specs you want to run.
[
four-phase-test
]:
https://robots.thoughtbot.com/four-phase-test
...
...
spec/spec_helper.rb
View file @
18c3a0b4
...
...
@@ -50,6 +50,9 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
quality_level
=
Quality
::
TestLevel
.
new
RSpec
.
configure
do
|
config
|
config
.
filter_run
focus:
true
config
.
run_all_when_everything_filtered
=
true
config
.
use_transactional_fixtures
=
true
config
.
use_instantiated_fixtures
=
false
config
.
fixture_path
=
Rails
.
root
...
...
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