Skip to content

Use ephemeral models in owning test cases - #115

Open
nertzy wants to merge 1 commit into
resolve-configured-table-name-rdyfrom
with-model-test-unit-migration
Open

Use ephemeral models in owning test cases#115
nertzy wants to merge 1 commit into
resolve-configured-table-name-rdyfrom
with-model-test-unit-migration

Conversation

@nertzy

@nertzy nertzy commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

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_table schemas and use anonymous superclasses to make with_model point at them.

Declare ordinary ephemeral models directly in their owning test cases, with schemas inside with_model and 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; retain table(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.

@nertzy nertzy changed the title with model test unit migration Scope test models to their owning cases Sep 5, 2026
@nertzy
nertzy force-pushed the with-model-test-unit-migration branch from 59af64d to 6eaee87 Compare September 5, 2026 01:30
@nertzy
nertzy force-pushed the with-model-test-unit-migration branch from 6eaee87 to a7c7603 Compare September 5, 2026 01:59
Keep model metadata regression coverage scoped to its owning tests.
@nertzy
nertzy force-pushed the with-model-test-unit-migration branch from a7c7603 to d8a410d Compare September 7, 2026 00:55
@nertzy nertzy changed the title Scope test models to their owning cases Use ephemeral models in owning test cases Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant