summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-16 13:05:18 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-16 13:05:18 +0200
commitc76f8f3e8fda0b2233254a58cd0c1672fc0b6c5a (patch)
tree58111591af9c89ea9c74a8727a8ce5fd1b00c5c4 /spec/spec_helper.rb
parent71564974935feafd3f0025ec51832fcea6cba003 (diff)
downloadgitlab-ce-c76f8f3e8fda0b2233254a58cd0c1672fc0b6c5a.tar.gz
Make it possible to provide schema version in tests
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index c606030220f..7d424cdf735 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -132,17 +132,12 @@ RSpec.configure do |config|
Sidekiq.redis(&:flushall)
end
- config.before(:context, :migration) do |example|
- ActiveRecord::Migrator
- .migrate(migrations_paths, previous_migration.version)
-
- reset_column_in_migration_models
+ config.before(:context, :migration) do
+ schema_migrate_down!
end
config.after(:context, :migration) do
- ActiveRecord::Migrator.migrate(migrations_paths)
-
- reset_column_in_migration_models
+ schema_migrate_up!
end
config.around(:each, :nested_groups) do |example|