diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-08-17 11:54:54 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-09-02 20:56:58 -0700 |
commit | 206fa16cee1654aa74c46204183bdb89cffea20f (patch) | |
tree | 409f12e19275f64f6614a179a3d577fca0c938be /spec/spec_helper.rb | |
parent | 0f8d7012138b9eec92ea0a42d63b10e363899aea (diff) | |
download | gitlab-ce-9-5-stable-patch-3.tar.gz |
Merge branch 'backstage/gb/migrations-tests-schema-version' into 'master'9-5-stable-patch-3
Improve migrations / background migrations testing strategy
Closes #36303
See merge request !13589
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d35c82b293c..2580776afb0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -136,17 +136,12 @@ RSpec.configure do |config| Sidekiq.redis(&:flushall) end - config.before(:example, :migration) do - ActiveRecord::Migrator - .migrate(migrations_paths, previous_migration.version) - - reset_column_in_migration_models + config.before(:each, :migration) do + schema_migrate_down! end - config.after(:example, :migration) do - ActiveRecord::Migrator.migrate(migrations_paths) - - reset_column_in_migration_models + config.after(:context, :migration) do + schema_migrate_up! end config.around(:each, :nested_groups) do |example| |