diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-29 18:07:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-29 18:07:54 +0300 |
commit | d0e26aa964d15e1499c60034420b6022c5f91af9 (patch) | |
tree | e3b475265b02f0721bb1af1bbb2939c6ae81a76e /doc/development | |
parent | 06466a128a06ae520ba7c8163d86407e8cdeefc5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/testing_guide/best_practices.md | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 97ebe9bd5a7..108003b2d76 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -278,26 +278,6 @@ new object. let_it_be(:project, refind: true) { create(:project) } ``` -### `set` variables - -NOTE: **Note:** -We are incrementally removing `set` in favour of `let_it_be`. See the -[removal issue](https://gitlab.com/gitlab-org/gitlab/issues/27922). - -In some cases there is no need to recreate the same object for tests again for -each example. For example, a project is needed to test issues on the same -project, one project will do for the entire file. This can be achieved by using -`set` in the same way you would use `let`. - -`rspec-set` only works on ActiveRecord objects, and before new examples it -reloads or recreates the model, _only_ if needed. That is, when you changed -properties or destroyed the object. - -Note that you can't reference a model defined in a `let` block in a `set` block. - -Also, `set` is not supported in `:js` specs since those don't use transactions -to clean up database state after each example. - ### Time-sensitive tests [Timecop](https://github.com/travisjeffery/timecop) is available in our |