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
early on i'd opened a ticket and created a branch about adding FactoryGirl FactoryBot to the project, but we closed it, because i didn't actually see the benefit at the time (seemed easy enough to use seeded fixtures, or create objects using ActiveRecord calls in let statements).
@atz has made a convincing case for how factories would simplify the creation of our test fixtures, especially since many of our test cases are just testing the ActiveRecord objects and their database interactions, and not the content of the fixture objects on disk. there are still cases where we care about using real fixture objects on disk, and for those, we don't want to use factories.
for everything else, to the degree that it's tractable in the time we have, we want to switch over to using factories instead of the more manual process of ActiveRecord create and find_by calls.
The text was updated successfully, but these errors were encountered:
We have a robust set of factories now. I'm closing this as having ambiguous scope.
I'd support a separate ticket for "Replace DB seeding w/ factories", since that is the really the only remaining pocket of anti-pattern in the test setup. Seeding currently installs 2 kinds of objects: MoabStorageRoot and ZipEndpoint (with PreservationPolicy.default_policy, indirectly). Most of the entanglements are in the overwrought POH specs.
early on i'd opened a ticket and created a branch about adding
FactoryGirlFactoryBot to the project, but we closed it, because i didn't actually see the benefit at the time (seemed easy enough to use seeded fixtures, or create objects using ActiveRecord calls inlet
statements).@atz has made a convincing case for how factories would simplify the creation of our test fixtures, especially since many of our test cases are just testing the ActiveRecord objects and their database interactions, and not the content of the fixture objects on disk. there are still cases where we care about using real fixture objects on disk, and for those, we don't want to use factories.
for everything else, to the degree that it's tractable in the time we have, we want to switch over to using factories instead of the more manual process of ActiveRecord
create
andfind_by
calls.The text was updated successfully, but these errors were encountered: