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
Either somehow directly expose the generated name as soon as the record is created, or expose the logic to generate names.
This will allow users to use the fixture name to store hash of created instances by name, and reference them to provide as associated objects when creating subsequent fixtures which have a dependency on them, without having to manually assign a local variable to track the instance, or manually assign a name or naming block when the built-in automatic naming would work fine.
I realize this is an old issue, but I agree that this would be super helpful, especially when trying to break things up into separate files as mentioned in https://github.com/rdy/fixture_builder#more-complete-config-example. I think in the meantime, one approach might be to set up a wrapper method that creates named fixtures and then stores them in a Hash, but I don't think that handles the automatic naming stuff unfortunately :(. It feels like at some level FixtureBuilder knows all the names of things at some point, but it might not compute them until after the factory method call ends so in the meantime you might end up needing to store references to objects some other way anyway.
Either somehow directly expose the generated name as soon as the record is created, or expose the logic to generate names.
This will allow users to use the fixture name to store hash of created instances by name, and reference them to provide as associated objects when creating subsequent fixtures which have a dependency on them, without having to manually assign a local variable to track the instance, or manually assign a name or naming block when the built-in automatic naming would work fine.
E.g.:
The text was updated successfully, but these errors were encountered: