From c76f8f3e8fda0b2233254a58cd0c1672fc0b6c5a Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 16 Aug 2017 13:05:18 +0200 Subject: Make it possible to provide schema version in tests --- spec/spec_helper.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'spec/spec_helper.rb') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c606030220f..7d424cdf735 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -132,17 +132,12 @@ RSpec.configure do |config| Sidekiq.redis(&:flushall) end - config.before(:context, :migration) do |example| - ActiveRecord::Migrator - .migrate(migrations_paths, previous_migration.version) - - reset_column_in_migration_models + config.before(:context, :migration) do + schema_migrate_down! end config.after(:context, :migration) do - ActiveRecord::Migrator.migrate(migrations_paths) - - reset_column_in_migration_models + schema_migrate_up! end config.around(:each, :nested_groups) do |example| -- cgit v1.2.3