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| ...@@ -106,15 +106,13 @@ RSpec.configure do |config|
Sidekiq.redis(&:flushall) Sidekiq.redis(&:flushall)
end end
config.around(:example, :migration) do |example| config.before(:example, :migration) do
begin ActiveRecord::Migrator
ActiveRecord::Migrator .migrate(migrations_paths, previous_migration.version)
.migrate(migrations_paths, previous_migration.version) end
example.run config.after(:example, :migration) do
ensure ActiveRecord::Migrator.migrate(migrations_paths)
ActiveRecord::Migrator.migrate(migrations_paths)
end
end end
config.around(:each, :nested_groups) do |example| 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