Commit 899f1d84 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix migrations testing support RSpec hooks order

parent 6f5a68f5
......@@ -106,16 +106,14 @@ RSpec.configure do |config|
Sidekiq.redis(&:flushall)
end
config.around(:example, :migration) do |example|
begin
config.before(:example, :migration) do
ActiveRecord::Migrator
.migrate(migrations_paths, previous_migration.version)
end
example.run
ensure
config.after(:example, :migration) do
ActiveRecord::Migrator.migrate(migrations_paths)
end
end
config.around(:each, :nested_groups) do |example|
example.run if Group.supports_nested_groups?
......
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