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

  • @BrainTrustDigital
    @BrainTrustDigital3 жыл бұрын

    ⏰ 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

  • @MoBetta42
    @MoBetta423 жыл бұрын

    Great video!

  • @BrainTrustDigital

    @BrainTrustDigital

    3 жыл бұрын

    Thank you! Let me know if you have any topics you would like me to cover!

  • @overcomeridemudia3199
    @overcomeridemudia3199 Жыл бұрын

    Ur content is always clear and precise. Thank you!

  • @CHACHANUS
    @CHACHANUS2 жыл бұрын

    great tutorial for factoryBot, Thanks a lottt!!!!!!

  • @BrainTrustDigital

    @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.

  • @davisnicholas9123
    @davisnicholas91232 жыл бұрын

    Very helpful! good job!

  • @BrainTrustDigital

    @BrainTrustDigital

    2 жыл бұрын

    Thanks, glad I could help! Let me know if you have any other topics you would like me to cover.

  • @shivangibansal5406

    @shivangibansal5406

    Жыл бұрын

    @@BrainTrustDigital Can you please cover association with factory bot traits

  • @shashankkestwal4454
    @shashankkestwal4454 Жыл бұрын

    helpful !

  • @BrainTrustDigital

    @BrainTrustDigital

    Жыл бұрын

    Glad I could help!

  • @matheusribeiro4611
    @matheusribeiro46112 жыл бұрын

    This is a very good video, thank you!

  • @BrainTrustDigital

    @BrainTrustDigital

    2 жыл бұрын

    Thank you! Really appreciate the kind words, let me know if there are any other topics you’d like me to cover!

  • @eonacademy5036
    @eonacademy50362 жыл бұрын

    Great video!... I loved it!!!. I suscribed, thank you! =)

  • @BrainTrustDigital

    @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.

  • @giauvo3955
    @giauvo39552 жыл бұрын

    Thank you very much

  • @BrainTrustDigital

    @BrainTrustDigital

    2 жыл бұрын

    No problem, glad I could help! Let me know if there are other topics you’d like me to cover.

  • @riyarb559
    @riyarb5592 жыл бұрын

    Nice explanation, Requesting you to make more rspec videos for testing rails app

  • @BrainTrustDigital

    @BrainTrustDigital

    2 жыл бұрын

    Thank you! I’ll see what I can come up with

  • @alehunter15
    @alehunter153 жыл бұрын

    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

    @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

  • @mateobravamateobrava989
    @mateobravamateobrava989 Жыл бұрын

    I could make associated traits work only with the following syntax trait :moderator do association :role, factory: :moderator_role end

  • @ramanan5185
    @ramanan51852 жыл бұрын

    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

    @BrainTrustDigital

    2 жыл бұрын

    Yes, is this a private or public project? If public, GitHub would be great for sharing.

  • @ramanan5185

    @ramanan5185

    2 жыл бұрын

    I fixed it mahn, thanks for the video !!!

  • @nejdetkadir4447
    @nejdetkadir44472 жыл бұрын

    what is name of your bash theme

Келесі