Commit ff61e2b7 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Reorder pipeline stages-related migrations

parent 23c93490
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170526190708) do
ActiveRecord::Schema.define(version: 20170526190948) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20170526101042_migrate_pipeline_stages.rb')
require Rails.root.join('db', 'post_migrate', '20170526185842_migrate_pipeline_stages.rb')
describe MigratePipelineStages, :migration, schema: 20170525132202 do
describe MigratePipelineStages, :migration, schema: 20170526185602 do
##
# Create test data - pipeline and CI/CD jobs.
#
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment