Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-26 23:33:50 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-26 23:33:50 +0300
commitff61e2b776badef7cd614e697a7eac20c63534eb (patch)
tree70f6316ea6d7cce067d328186739bc1c857901f8 /spec/spec_helper.rb
parent23c93490824bbdf335ef416271d521f65ed3b964 (diff)
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