#FactoryBot

Aaron Sumnerruralocity
2024-08-04

In a way, I'm glad I let my book grow stale for as long as I did. It’s enlightening to reflect on coding/testing habits I had 5+ years ago vs. now.

I'm making updates accordingly—breaking up larger chapters/concepts into shorter, simpler takes. Reordering content so readers can be productive in their own codebases sooner.

Anyway, next batch of updates coming this week, I hope, with some streamlined advice on getting started with . Stay tuned, friends! leanpub.com/everydayrailsrspec

Edge Case ℭɑⅈᵤˢcaius@ruby.social
2024-05-08

I was surprised to find our FactoryBot factory files being loaded in development environment. Turns out to be because we include the factory_bot_rails gem in the development group, so we can use the rails generators it provides.

The factory_bot_rails Readme mentions how to stop factories being autoloaded in development environment: github.com/thoughtbot/factory_ #rails #factorybot

Test Doubletestdouble
2023-11-13

@searls has a free-as-in-puppy open source opportunity for the person who can give it a good home. We Rate Dogs would give test_data an 11/10: unique personality, super fast, and this Ruby gem gets along well with everyone.

Consider it a reference implementation for a pattern that every web application framework should consider adopting. If that sounds intriguing maybe you're the one who should adopt test_data 🐶
link.testdouble.com/new-ruby-t

2023-10-27

Leaving this here in case anyone is losing sleep over their lack of FactoryBot knowledge 🛌 😁

honeybadger.io/blog/factorybot
#ruby #rails #factorybot

:rss: Qiita - 人気の記事qiita@rss-mstdn.studiofreesia.com
2023-10-16

【初心者向け】Railsでテストコードを書くときにテストデータにidをベタ書きするのはやめよう
qiita.com/jnchito/items/6beb97
#qiita #Ruby #Rails #RSpec #minitest #FactoryBot

2023-09-18

Two weeks of open source updates from @thoughtbot right in your Monday feed. Includes details of a new version release of factory_bot!

thoughtbot.com/blog/this-week-

#thoughtbot #ruby #openSource #factoryBot

Michael ToulouseMichaelT@ruby.social
2023-03-30

... and here's the version with #FactoryBot ...

Michael ToulouseMichaelT@ruby.social
2023-03-05

... and here's the after! #Rails #Rspec #FactoryBot (2/2)

Final results for a run of RSpec tests using FactoryBot. Slowest test took 0.893 seconds. And the whole run was done in 5.77 seconds!
2023-02-07

I never liked the attributes_for helper from #FactoryBot but today in a #requestspec I finally saw an example that it made a test green / not-flaky even though it shouldn't 🤓 🤨

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst