Factory Bot Tutorial for Beginners
Тәжірибелік нұсқаулар және стиль
In this AWS + Rails tutorial we cover how to use factory bot for beginners. We start by installing and configuring the factory_bot_rails gem. Next we create our first factory using the factory_bot rails generators and update our spec to accommodate. Finally, we walk through several features of factory_bot including sequences, traits, nested factories and associations.
⏰ Timestamps
0:00 Introduction
0:42 Gem install
1:46 factory_bot config
2:59 Import support files
3:45 Create a factory
4:26 Use new factory
6:34 Run Test Suite
7:16 Using sequence
8:35 Dynamic sequences
9:47 Using Traits
11:08 Nested factories
11:51 Update user factory
13:28 Using associations
15:36 Using with devise create
17:25 Explicit associations
19:08 Push to GitHub
20:28 Closing notes
How to use Git and GitHub for your Rails Application
- • How to use Git and Git...
AWS + Rails Series Playlist
- • AWS + Rails
My Gear List
- brain-trust.io/my-gear
My KZread SEO Software
- www.tubebuddy.com/braintrust
My Accounting Software
- shareasale.com/r.cfm?b=960179...
Try Audible and Get Two Free Audiobooks
- amzn.to/36dXe3V
Make sure you subscribe to my channel to keep up to date with new content!
DISCLAIMER: Links in this description include affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting BrainTrust Digital so I can continue to provide you with free content each week!
Пікірлер: 26
⏰ Timestamps 0:00 Introduction 0:42 Gem install 1:46 factory_bot config 2:59 Import support files 3:45 Create a factory 4:26 Use new factory 6:34 Run Test Suite 7:16 Using sequence 8:35 Dynamic sequences 9:47 Using Traits 11:08 Nested factories 11:51 Update user factory 13:28 Using associations 15:36 Using with devise create 17:25 Explicit associations 19:08 Push to GitHub 20:28 Closing notes
Great video!
@BrainTrustDigital
3 жыл бұрын
Thank you! Let me know if you have any topics you would like me to cover!
Ur content is always clear and precise. Thank you!
great tutorial for factoryBot, Thanks a lottt!!!!!!
@BrainTrustDigital
2 жыл бұрын
So glad you liked it! Please let me know if there are any other topics you would like me to try to cover.
Very helpful! good job!
@BrainTrustDigital
2 жыл бұрын
Thanks, glad I could help! Let me know if you have any other topics you would like me to cover.
@shivangibansal5406
Жыл бұрын
@@BrainTrustDigital Can you please cover association with factory bot traits
helpful !
@BrainTrustDigital
Жыл бұрын
Glad I could help!
This is a very good video, thank you!
@BrainTrustDigital
2 жыл бұрын
Thank you! Really appreciate the kind words, let me know if there are any other topics you’d like me to cover!
Great video!... I loved it!!!. I suscribed, thank you! =)
@BrainTrustDigital
2 жыл бұрын
Thank you some much! Glad you enjoyed the video. Do you have any areas around testing in rails you would like me to cover? I feel like there is not enough current content covering this topic.
Thank you very much
@BrainTrustDigital
2 жыл бұрын
No problem, glad I could help! Let me know if there are other topics you’d like me to cover.
Nice explanation, Requesting you to make more rspec videos for testing rails app
@BrainTrustDigital
2 жыл бұрын
Thank you! I’ll see what I can come up with
Interesting material. I would also like to see content for Sinatra apps as well as an opinion video for ruby's future and rails market in USA :)
@alehunter15
3 жыл бұрын
+as for ror I would like to see an app using info from an api as apis' consumption is something there is not a lot of content online
I could make associated traits work only with the following syntax trait :moderator do association :role, factory: :moderator_role end
Create is not saving the instance to the database for me . I don't know why , could you help me ? Can I share my code someway
@BrainTrustDigital
2 жыл бұрын
Yes, is this a private or public project? If public, GitHub would be great for sharing.
@ramanan5185
2 жыл бұрын
I fixed it mahn, thanks for the video !!!
what is name of your bash theme