Commit 71564974 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Migrate db schema for context in :migration specs

parent 04f7f394
...@@ -132,14 +132,14 @@ RSpec.configure do |config| ...@@ -132,14 +132,14 @@ RSpec.configure do |config|
Sidekiq.redis(&:flushall) Sidekiq.redis(&:flushall)
end end
config.before(:example, :migration) do config.before(:context, :migration) do |example|
ActiveRecord::Migrator ActiveRecord::Migrator
.migrate(migrations_paths, previous_migration.version) .migrate(migrations_paths, previous_migration.version)
reset_column_in_migration_models reset_column_in_migration_models
end end
config.after(:example, :migration) do config.after(:context, :migration) do
ActiveRecord::Migrator.migrate(migrations_paths) ActiveRecord::Migrator.migrate(migrations_paths)
reset_column_in_migration_models reset_column_in_migration_models
......
...@@ -19,7 +19,7 @@ RSpec.configure do |config| ...@@ -19,7 +19,7 @@ RSpec.configure do |config|
DatabaseCleaner.strategy = :truncation DatabaseCleaner.strategy = :truncation
end end
config.before(:each, :migration) do config.before(:context, :migration) do
DatabaseCleaner.strategy = :truncation DatabaseCleaner.strategy = :truncation
end end
......
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