Skip to content
Snippets Groups Projects
Commit 71564974 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Migrate db schema for context in :migration specs

parent 04f7f394
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment