Commit 8e8e7d42 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'fix/gb/fix-migrations-testing-support-hooks-order' into 'master'

Fix migrations testing support RSpec hooks order

Closes #33583

See merge request !12120
parents 1b54982f 899f1d84
......@@ -106,15 +106,13 @@ 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
config.before(:example, :migration) do
ActiveRecord::Migrator
.migrate(migrations_paths, previous_migration.version)
end
config.after(:example, :migration) do
ActiveRecord::Migrator.migrate(migrations_paths)
end
config.around(:each, :nested_groups) do |example|
......
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