Use ephemeral models in owning test cases - #115
Open
nertzy wants to merge 1 commit into
Open
Conversation
nertzy
force-pushed
the
with-model-test-unit-migration
branch
from
September 5, 2026 01:30
59af64d to
6eaee87
Compare
nertzy
force-pushed
the
with-model-test-unit-migration
branch
from
September 5, 2026 01:59
6eaee87 to
a7c7603
Compare
Keep model metadata regression coverage scoped to its owning tests.
nertzy
force-pushed
the
with-model-test-unit-migration
branch
from
September 7, 2026 00:55
a7c7603 to
d8a410d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test suite creates a broad shared schema and keeps model constants loaded beyond the cases that need them. Moving that setup into cases is not enough if the tests still assemble fixed
with_tableschemas and use anonymous superclasses to makewith_modelpoint at them.Declare ordinary ephemeral models directly in their owning test cases, with schemas inside
with_modeland assertions based on each model’s generated table name. Separate model-free configuration and filesystem coverage from model-backed and raw-SQL cases. Keep manual lifecycle control only at genuine raw-table, autoloading, namespaced-constant, connection-pool, schema-error, and subprocess boundaries; retaintable(false)only for shared-table STI.Each example gets an empty temporary fixture directory and its own manifest. Legacy fixture inputs keep their actual filenames, while native model metadata routes them into the live ephemeral tables. This preserves the fixture-loading coverage from #113 without external class maps, copied generated-output seeds, or a suite-wide schema.
This layer changes tests only; the resolver and generated metadata behavior live in #113.