The one about using factories with entities in Sinatra
https://blog.davidmp.es/the-one-about-using-factories-with-entities-in-sinatra
#ruby #rubyonrails #rails #dev #programming #sinatra #sinatrarb #rspec #factorybot
The one about using factories with entities in Sinatra
https://blog.davidmp.es/the-one-about-using-factories-with-entities-in-sinatra
#ruby #rubyonrails #rails #dev #programming #sinatra #sinatrarb #rspec #factorybot
In a way, I'm glad I let my #RSpec 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 #FactoryBot. Stay tuned, friends! https://leanpub.com/everydayrailsrspec
#test #factorybot #minitest #howto #rails #ruby : "Testing Rails Apps with FactoryBot and MiniTest"(https://fuzzyblog.io/blog/rails/2022/07/27/testing-rails-apps-with-factorybot-and-minitest.html)
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: https://github.com/thoughtbot/factory_bot_rails#automatic-factory-definition-loading #rails #factorybot
@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 🐶
https://link.testdouble.com/new-ruby-test-data-gem
#Ruby #Rails #FactoryBot #Factories #Fixtures
Leaving this here in case anyone is losing sleep over their lack of FactoryBot knowledge 🛌 😁
https://www.honeybadger.io/blog/factorybot-for-rails-testing-md/
#ruby #rails #factorybot
【初心者向け】Railsでテストコードを書くときにテストデータにidをベタ書きするのはやめよう
https://qiita.com/jnchito/items/6beb97e73934eb3e4dce?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
#qiita #Ruby #Rails #RSpec #minitest #FactoryBot
Two weeks of open source updates from @thoughtbot right in your Monday feed. Includes details of a new version release of factory_bot!
https://thoughtbot.com/blog/this-week-in-open-source-sep-14-2023
... and here's the version with #FactoryBot ...
... and here's the after! #Rails #Rspec #FactoryBot (2/2)
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 🤓 🤨