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:
authorKamil Trzciński <ayufan@ayufan.eu>2017-06-07 14:30:18 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2017-06-07 14:30:18 +0300
commitacd0b691a4a23bca1d90f68e2fab9004ea259a0e (patch)
treea3086d731d2eef852e25231e9a2541e3498187f4 /spec/spec_helper.rb
parentcedfde549f9113865125c0bd6446416f88a9b391 (diff)
parent36ed05faf48bddd53f54971ec9b0f2c611c958d7 (diff)
Merge branch 'feature/gb/migrate-pipeline-stages' into 'master'
Migrate pipeline stages in the database See merge request !11714
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index f800c5bcb07..8b8fbf6e862 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -56,6 +56,7 @@ RSpec.configure do |config|
config.include StubGitlabCalls
config.include StubGitlabData
config.include ApiHelpers, :api
+ config.include MigrationsHelpers, :migration
config.infer_spec_type_from_file_location!
@@ -97,6 +98,17 @@ RSpec.configure do |config|
Sidekiq.redis(&:flushall)
end
+ config.around(:example, :migration) do |example|
+ begin
+ ActiveRecord::Migrator
+ .migrate(migrations_paths, previous_migration.version)
+
+ example.run
+ ensure
+ ActiveRecord::Migrator.migrate(migrations_paths)
+ end
+ end
+
config.around(:each, :nested_groups) do |example|
example.run if Group.supports_nested_groups?
end