Add check_pending! call for test migrations

Close SCI-3567
This commit is contained in:
Jure Grabnar 2019-07-31 14:57:47 +02:00
parent 971f52b4b0
commit c63737f750

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