rspec: allow Rails to auto-migrate the test schema

rails_helper already has `ActiveRecord::Migration.maintain_test_schema!`
which automatically updates the test database if needed.

However, if we raise **before** `maintain_test_schema` had the chance
to do its job, the test database is never-automigrated.

Thus by removing the check, we ensure the test database will be migrated
as needed (and still an error will be raised if the schema cannot be
applied).
This commit is contained in:
Pierre de La Morinerie 2020-03-25 14:53:15 +01:00
parent 4cb747fdb6
commit cae256fd28

View file

@ -69,10 +69,6 @@ end
Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
Dir[Rails.root.join('spec', 'factories', '**', '*.rb')].each { |f| require f }
# Checks for pending migrations before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
VCR.configure do |c|
c.ignore_localhost = true
c.hook_into :webmock