summaryrefslogtreecommitdiff
path: root/doc/development/testing_guide/best_practices.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-09 03:07:56 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-09 03:07:56 +0000
commitafa0ab923d697a3e737b04d078d3f28e0d573901 (patch)
treefa06ad775e52d99f1bd0fa2107452a2853fce015 /doc/development/testing_guide/best_practices.md
parente8793358645d6c84b46ef56dafcbf834f20d6415 (diff)
downloadgitlab-ce-afa0ab923d697a3e737b04d078d3f28e0d573901.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/testing_guide/best_practices.md')
-rw-r--r--doc/development/testing_guide/best_practices.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md
index 8dd5e2b1265..a845b5a26e8 100644
--- a/doc/development/testing_guide/best_practices.md
+++ b/doc/development/testing_guide/best_practices.md
@@ -67,7 +67,7 @@ When using spring and guard together, use `SPRING=1 bundle exec guard` instead t
- Don't supply the `:each` argument to hooks since it's the default.
- 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 a Capybara 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.
- Use [`:aggregate_failures`](https://relishapp.com/rspec/rspec-core/docs/expectation-framework-integration/aggregating-failures) when there is more than one expectation in a test.
- For [empty test description blocks](https://github.com/rubocop-hq/rspec-style-guide#it-and-specify), use `specify` rather than `it do` if the test is self-explanatory.