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