Closed tylergannon closed 1 year ago
Does the default helper file not contain something like this? Therefore is additional configuration actually necessary?
@jonleighton The default helper (as of Rails 5.1.5) is specified globally in rails_helper.rb
. That means it is executed once, and only once, when rails_helper
is require
d at app boot. Successive runs with spring will fork the in-memory process, and thus it will not be triggered (as the process no longer needs to require 'rails_helper'
again).
What @tylergannon's change proposes is to run ActiveRecord::Migration.maintain_test_schema!
before the test suite is run every time (via before(:suite)
callback). This seems like a sensible approach when using something like spring.
This instructs developers how to avoid the "pending migrations" error