Added
- Support for unique options in
fake
DSL (via #94) (@sean-dickinson)
Factory.define(:user) do |f|
f.name { fake(:name, unique: true) }
end
Be advised there's Faker::UniqueGenerator.clear
to clear the cache of unique values.
Factory.define :category do |f|
f.association :image, traits: [:fancy]
end
Factory.create
is aliased to Factory.[]
Factory.build
is aliased to Factory.structs[]
Changed
- Minimum Ruby version is now 3.1 (@flash-gordon)