diff options
author | Phil Hughes <me@iamphill.com> | 2016-11-24 11:32:59 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-11-24 11:32:59 +0000 |
commit | 8c4f4afd6dd6d382aab2d6b992b6ffe3e60f91af (patch) | |
tree | 37d3ff76dc31e7fcfa63eb8c2f54c9d84eb9b88a /doc/development/testing.md | |
parent | 03a235783f697572fe201332cb82746401a01daf (diff) | |
parent | 3e44ed3e2bf75bb14a2d8b0466b3d92afd0ea067 (diff) | |
download | gitlab-ce-autocomplete-space-prefix.tar.gz |
Merge branch 'master' into autocomplete-space-prefixautocomplete-space-prefix
Diffstat (limited to 'doc/development/testing.md')
-rw-r--r-- | doc/development/testing.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/development/testing.md b/doc/development/testing.md index b0b26ccf57a..dbea6b9c9aa 100644 --- a/doc/development/testing.md +++ b/doc/development/testing.md @@ -63,12 +63,16 @@ 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. - Prefer `not_to` to `to_not` (_this is enforced by Rubocop_). - Try to match the ordering of tests to the ordering within the class. - Try to follow the [Four-Phase Test][four-phase-test] pattern, using newlines to separate phases. +- Try to use `Gitlab.config.gitlab.host` rather than hard coding `'localhost'` [four-phase-test]: https://robots.thoughtbot.com/four-phase-test |