summaryrefslogtreecommitdiff
path: root/doc/development/testing.md
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-23 12:58:16 +0100
committerRobert Speicher <rspeicher@gmail.com>2016-11-24 17:36:09 +0800
commit39378d0e976d9552e96b300cb7f43874424d13b3 (patch)
tree96bac97c9a9ed3bf746efb59bc879906f0fc10dd /doc/development/testing.md
parent6f7ce372921a322c48e659d8382a04895fd29b1f (diff)
downloadgitlab-ce-39378d0e976d9552e96b300cb7f43874424d13b3.tar.gz
Document that we always use `do...end` for `before` in RSpecimprove-testing-styleguide
[ci skip] Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'doc/development/testing.md')
-rw-r--r--doc/development/testing.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/development/testing.md b/doc/development/testing.md
index 6106e47daa0..dbea6b9c9aa 100644
--- a/doc/development/testing.md
+++ b/doc/development/testing.md
@@ -63,6 +63,8 @@ the command line via `bundle exec teaspoon`, or via a web browser at
- Use `.method` to describe class methods and `#method` to describe instance
methods.
- Use `context` to test branching logic.
+- Use multi-line `do...end` blocks for `before` and `after`, even when it would
+ fit on a single line.
- Don't `describe` symbols (see [Gotchas](gotchas.md#dont-describe-symbols)).
- Don't assert against the absolute value of a sequence-generated attribute (see [Gotchas](gotchas.md#dont-assert-against-the-absolute-value-of-a-sequence-generated-attribute)).
- Don't supply the `:each` argument to hooks since it's the default.