Коммит 2238ac95 создал по автору Andy Hohenner's avatar Andy Hohenner
Просмотр файлов

Simplifying the rules

владелец 8d0c13a1
......@@ -34,14 +34,15 @@ end
1. Keep descriptions as concise as possible.
1. Long descriptions or multiple conditionals could be a sign it should be split up (additional `context` blocks)
1. The outermost `Rspec.describe` block should be [the DevOps stage name](https://about.gitlab.com/handbook/product/categories/#devops-stages)
1. Inside that block is a `describe` block with the name of the feature being tested
1. Inside that block are optional `context` blocks with names that define what the conditions being tested are
1. Inside the `Rspec.describe` block is a `describe` block with the name of the feature being tested
1. Optional `context` blocks define what the conditions being tested are
1. `context` blocks descriptions should begin with `when`, `with`, `without`, `for`, `and`, `on`, `in`, `as`, or `if` to match the [rubocop rule](https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording)
1. The innermost `it` block describes the pass/fail criteria for the test
1. The `it` block describes the pass/fail criteria for the test
1. In `shared_examples` with a single example a `specify` block can be used instead of a named `it` block
### Conventions flowchart
```mermaid
graph TB
rspec_describe{`RSpec.describe`\nis\nDevOps Stage Name?}
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать