diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-08-17 11:42:17 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-08-17 11:42:17 +0200 |
commit | 56d24bcf80c7b6e93e298adb8214f4b2e97d094b (patch) | |
tree | 8a1b1aa64ef62eea68c5e8e4bf680a556202ea8d /spec | |
parent | d90b0f8c996906682e5ad9125eb60f6115cce559 (diff) | |
download | gitlab-ce-56d24bcf80c7b6e93e298adb8214f4b2e97d094b.tar.gz |
Migrate down before each migration unit testbackstage/gb/migrations-tests-schema-version
`migrate!` helper triggers a migration that is under the test, so we
need to revert it before each subsequent example. This means that we
need to place it in `before(:each, :migration)` hook.
We still want to migrate everything up *after* each *context*, so in
otherwords we need to place migrate up helper in `before(:context,
:migration)`.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7d424cdf735..c10197ff651 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -132,7 +132,7 @@ RSpec.configure do |config| Sidekiq.redis(&:flushall) end - config.before(:context, :migration) do + config.before(:each, :migration) do schema_migrate_down! end |