diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 00:09:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 00:09:16 +0300 |
commit | 154b9bae142ba15fec753f44327654595094b879 (patch) | |
tree | 027f8ae024961778d5b00c77a72fe302f985d4f3 /doc/development/background_migrations.md | |
parent | 2c156e3c7bbade01c36eee18327f1ced6eebea79 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/background_migrations.md')
-rw-r--r-- | doc/development/background_migrations.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/development/background_migrations.md b/doc/development/background_migrations.md index 9dbfde98766..c28008c94b8 100644 --- a/doc/development/background_migrations.md +++ b/doc/development/background_migrations.md @@ -301,12 +301,13 @@ It is required to write tests for: - The background migration itself. - A cleanup migration. -You can use the `:migration` RSpec tag when testing the migrations. +The `:migration` and `schema: :latest` RSpec tags are automatically set for +background migration specs. See the [Testing Rails migrations](testing_guide/testing_migrations_guide.md#testing-a-non-activerecordmigration-class) style guide. -When you do that, keep in mind that `before` and `after` RSpec hooks are going +Keep in mind that `before` and `after` RSpec hooks are going to migrate you database down and up, which can result in other background migrations being called. That means that using `spy` test doubles with `have_received` is encouraged, instead of using regular test doubles, because |