This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-29
Channels
- # announcements (7)
- # asami (13)
- # babashka (22)
- # beginners (52)
- # calva (95)
- # clj-kondo (14)
- # cljs-dev (7)
- # clojars (5)
- # clojure (94)
- # clojure-austin (5)
- # clojure-dev (15)
- # clojure-europe (25)
- # clojure-nl (18)
- # clojure-uk (15)
- # clojuredesign-podcast (28)
- # clojurescript (63)
- # copenhagen-clojurians (1)
- # cursive (3)
- # datalevin (7)
- # datascript (13)
- # datomic (13)
- # duct (14)
- # emacs (24)
- # events (1)
- # fulcro (13)
- # graphql (7)
- # kaocha (4)
- # lambdaisland (6)
- # lsp (22)
- # music (5)
- # off-topic (24)
- # rdf (1)
- # re-frame (3)
- # reitit (9)
- # shadow-cljs (23)
- # sql (15)
- # testing (4)
- # tools-build (6)
- # vim (7)
- # vscode (7)
- # xtdb (21)
Façaí looks really good and without actually using it seems like it covers all of the base cases. I appreciate the inclusion of traits, which is one of my favorite features in factory_bot. It seems that traits currently are just alternatives to specified columns in the factory. In fb, they’re a specific context that allows for more complex logic, such as embedding/calling other traits or referencing before/after handlers (which i know isn't part of facai yet). Any plans to implement that logic?
https://github.com/thoughtbot/factory_bot/blob/37fde91df1b5b1b3bedd73a559f7b299452844ac/GETTING_STARTED.md is the full guide so you can cross reference, but here’s a simple example of a trait referencing another trait:
factory :order do
trait :completed do
completed_at { 3.days.ago }
end
trait :refunded do
completed
refunded_at { 1.day.ago }
end
end
I would be willing to implement this and/or other factory_bot-style functionality, if you're interested
Help would definitely be appreciated, but let's then make sure we agree on how it should behave in terms of API. Maybe start with creating an issue for discussion?
https://github.com/lambdaisland/facai/issues/1 there you go. I wrote that on my phone so hopefully it's legible.