Added
-
Support transient attributes. (@rickenharp in #97)
Define transient attributes inside a
transientblock. Other attributes can depend on them, but they are not part of the resulting tuple or struct. You can override them when building, like any other attribute.Factory.define(:user) do |f| f.transient do |t| t.password "secret" end f.password_hash { |password| BCrypt::Password.create(password) } end Factory[:user, password: "something else"]
Changed
- Minimum Ruby version is now 3.3. (@alassek)
- Add
tsortas an explicit runtime dependency. (@flash-gordon)