-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
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.:
users = [Factory(:user, :name => "david")]
models[:user] = users.map{|u| fbuilder.fixture_name_for(u)}
Factory(:purchase, user: models[:user][:david])ibrahima
Metadata
Metadata
Assignees
Labels
No labels