summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-26 22:33:50 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-26 22:33:50 +0200
commitff61e2b776badef7cd614e697a7eac20c63534eb (patch)
tree70f6316ea6d7cce067d328186739bc1c857901f8 /spec/spec_helper.rb
parent23c93490824bbdf335ef416271d521f65ed3b964 (diff)
downloadgitlab-ce-ff61e2b776badef7cd614e697a7eac20c63534eb.tar.gz
Reorder pipeline stages-related migrations
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index b4ece5c60c1..6a0e29f2edb 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -95,12 +95,14 @@ RSpec.configure do |config|
end
config.around(:example, migration: true) do |example|
- schema_version = example.metadata.fetch(:schema)
- ActiveRecord::Migrator.migrate(migrations_paths, schema_version)
+ begin
+ schema_version = example.metadata.fetch(:schema)
+ ActiveRecord::Migrator.migrate(migrations_paths, schema_version)
- example.run
-
- ActiveRecord::Migrator.migrate(migrations_paths)
+ example.run
+ ensure
+ ActiveRecord::Migrator.migrate(migrations_paths)
+ end
end
end