Since the newest Rails version, ActiveRecord::MigrationContext#new seems to take a new argument called schema_migration. But I have no idea what to pass there and where to get it.
I cannot find any information on it. I googled for an hour, all examples for MigrationContext I found referred to older rails versions. The class MigrationContext doesn't seem to be documented at all. From the source code I couldn't figure out what to pass either.
Some context: I am trying to test some of my more dangerous migrations. I found quite a few tutorials and it seemed easy and I went along an did it. But the code that prepares the state of the test db so I can apply the migration is currently not working. Sadly all the tutorials used older Rails versions and this fails due to the wrong number of arguments:
ActiveRecord::MigrationContext.new(migrations_paths)