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
9dc4cf88
Commit
9dc4cf88
authored
Sep 16, 2020
by
Thong Kuah
Committed by
Mike Jang
Sep 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Clarify definition of subject
parent
10752109
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
doc/development/testing_guide/best_practices.md
doc/development/testing_guide/best_practices.md
+3
-1
No files found.
doc/development/testing_guide/best_practices.md
View file @
9dc4cf88
...
...
@@ -448,7 +448,9 @@ so we need to set some guidelines for their use going forward:
-
`let!`
variables should be used only in case if strict evaluation with defined
order is required, otherwise
`let`
will suffice. Remember that
`let`
is lazy and won't
be evaluated until it is referenced.
-
Use named
`subject(:name)`
over un-named
`subject`
in examples, as this gives the subject a contextual name.
-
Avoid referencing
`subject`
in examples. Use a named subject
`subject(:name)`
, or a
`let`
variable instead, so
the variable has a contextual name.
-
If the
`subject`
is never referenced inside examples, then it's acceptable to define the
`subject`
without a name.
### Common test setup
...
...
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