Data generator with support for persistence backends
[BREAKING] attributes are always passed as keywords (@alassek) This may affect your code in places where attributes are passed as hashes. Places like
user_attributes = { name: 'Jane' }
Factory[:user, user_attributes]
must be updated to
user_attributes = { name: 'Jane' }
Factory[:user, **user_attributes]
Upgraded to the latest versions of dry-rb dependencies, compatible with rom 5.3 (@flash-gordon)
Support for Faker 1.x was dropped (@alassek)
struct_namespace
option is supported by factory builders (@graceful-potato)
factories.define(:user, struct_namespace: MyApp::Entities) do |f|
# ...
end
TupleEvaluator#struct_attrs
for non-standard output schema (@AMHOL)FactoryNotDefinedError
exception (GustavoCaso + solnic)f.sequence(:login) { |i, name| "name-#{i}"}
(solnic)