maintain_test_schema! changed behaviour and now launches db:test:prepare in the background, causing the environment to be loaded again. A check in the initializer prevents this from happening recursively.
Ideally this call would be removed from the initializers and leave it to rails/test_help, but requires one of three solutions:
1. validates_lengths_from_database and validate_inclusion_in_families must be lazier, not checking the database during class initialisation. The Rails environment and even some models could be loaded but only start working after the DB is available, instead of not setting up their validators.
2. Remove all model class loading from the environment setup. The apipie initializer can be made lazier, the HostObserver can be refactored, but many plugins still cause models to be loaded through to_prepare hooks.
3. Ignore the problem, always set up the test DB schema externally before using rake tasks, without relying on rails/test_help and maintain_test_schema.
Any of these would allow for the Rails environment to be loaded either before the test DB schema is maintained without an effect on behaviour.
Test failures in the pagelets tests are fixed, which previously referenced partials stored outside of the known view paths. These are blocked by Rails in the Action View CVE-2016-0752 fix, so instead the static fixtures directory is added to the view search paths.
fixes #12873 - update Rails to 4.1.14.1
maintain_test_schema! changed behaviour and now launches db:test:prepare
in the background, causing the environment to be loaded again. A check
in the initializer prevents this from happening recursively.
Ideally this call would be removed from the initializers and leave it to
rails/test_help, but requires one of three solutions:
1. validates_lengths_from_database and validate_inclusion_in_families
must be lazier, not checking the database during class
initialisation. The Rails environment and even some models could be
loaded but only start working after the DB is available, instead of
not setting up their validators.
2. Remove all model class loading from the environment setup. The
apipie initializer can be made lazier, the HostObserver can be
refactored, but many plugins still cause models to be loaded through
to_prepare hooks.
3. Ignore the problem, always set up the test DB schema externally
before using rake tasks, without relying on rails/test_help and
maintain_test_schema.
Any of these would allow for the Rails environment to be loaded either
before the test DB schema is maintained without an effect on behaviour.
Test failures in the pagelets tests are fixed, which previously
referenced partials stored outside of the known view paths. These are
blocked by Rails in the Action View CVE-2016-0752 fix, so instead the
static fixtures directory is added to the view search paths.