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

Fix migrations testing support RSpec hooks order

parent 6f5a68f5
...@@ -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