You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix fixture declarations not propagating to auto-included shared example groups
When shared example groups are auto-included via `config.include_context`
with metadata filters, RSpec creates those child groups during
configuration — before the spec file's `fixture` call sets the
declaration on the parent group's metadata. Since RSpec snapshots parent
metadata into child groups at creation time, the child's metadata never
includes the fixture declaration, and the `prepend_before` hook never
fires for those examples.
The fix uses RSpec's own `update_inherited_metadata` to propagate the
fixture declaration to any child groups that already exist when `fixture`
is called. This is the same mechanism RSpec uses internally to push
metadata updates to descendants.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments