[SCI-3567] Add check_pending! call for test migrations (#1960)

[SCI-3567] Add check_pending! call for test migrations
This commit is contained in:
Jure Grabnar 2019-08-06 14:11:34 +02:00 committed by GitHub
commit dc48e8b339
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,9 +29,12 @@ Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
#
# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
# Checks for pending migration and applies them before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!
# Checks for pending migration
begin
ActiveRecord::Migration.check_pending!
rescue ActiveRecord::PendingMigrationError => e
abort(e.message)
end
RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures