I found a few key bugs while working to support two critical tasks, migrate :up and :down. Please read over the commits for details. I'll be stacking a few more commits on top of this. I think the biggest thing I learned is as follows:
The SecondBase.on_base was not nested happy and needed a bit of state tracking.
Most ah-hoc SecondBase only tasks require that we call db:load_config beforehand so on base state wins.
A few key changes also include:
The dummy_migration helper makes a real secondbase migration. Helper returns both the version and file which different tests/helpers utilize.
Removed redundant run helpers. Now only run_db and run_secondbase are needed. These take a rake task argument and an optional stream to capture. This is critical as some tasks use :stdout for errors before Rails 4.2 fixed them to go to :stderr. The test DSL is now better for it too.
Did some meta programming for the Rails version helpers. Now includes exact and exact & up query methods.
I found a few key bugs while working to support two critical tasks, migrate :up and :down. Please read over the commits for details. I'll be stacking a few more commits on top of this. I think the biggest thing I learned is as follows:
db:load_config
beforehand so on base state wins.A few key changes also include:
dummy_migration
helper makes a real secondbase migration. Helper returns both the version and file which different tests/helpers utilize.run_db
andrun_secondbase
are needed. These take a rake task argument and an optional stream to capture. This is critical as some tasks use:stdout
for errors before Rails 4.2 fixed them to go to:stderr
. The test DSL is now better for it too.