SBaronda.com a little place I like to call home.


FactoryBot Tips

Jul. 30, 2020

Using FactoryBot bots outside of Rails Projects is as simple as

rails s -e test
include FactoryBot::Syntax::Methods
FactoryBot.find_definitions
create(:my_cool_factory)

I use this quite a bit to analyze the SQL that gets called and to validate my factories in isolation.


comments powered by Disqus