Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-10 17:24:23 +0300
committerRémy Coutable <remy@rymai.me>2016-11-16 19:55:11 +0300
commit600282799606ed260a1149d8312494a2f6a83290 (patch)
tree5afc3e9d5bcdf4ed2e6bc66faf4743e70df05e6b /doc/development/testing.md
parenta65f83c6de7286fa0505742946a3629848b260c3 (diff)
Add a gotcha about FactoryGirl sequences
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/24341 Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'doc/development/testing.md')
-rw-r--r--doc/development/testing.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/development/testing.md b/doc/development/testing.md
index b0b26ccf57a..4dc535fb359 100644
--- a/doc/development/testing.md
+++ b/doc/development/testing.md
@@ -64,6 +64,7 @@ the command line via `bundle exec teaspoon`, or via a web browser at
methods.
- Use `context` to test branching logic.
- 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.
- Prefer `not_to` to `to_not` (_this is enforced by Rubocop_).
- Try to match the ordering of tests to the ordering within the class.