RSpec Tutorial for Beginners

Sdílet
Vložit
  • čas přidán 19. 05. 2024
  • Are you a beginner trying to set up testing with RSpec in your Ruby on Rails 6 application? In this AWS Rails tutorial we going to walk through how to install and set up RSpec. Adding RSpec will allow us to write tests to validate our code. This test code acts as a safety net to ensure we don’t unintentionally break features in the future. We will walk though the basic RSpec install as well as he creation of a simple model spec. This tutorial is the foundation, we will continue covering testing topics and integrating testing tools with our Ruby on Rails app in the future.
    ⏰ Timestamps
    0:00 Introduction
    1:11 Gem install
    2:45 RSpec install
    2:59 Run Test Suite
    3:30 Generate a spec
    5:32 Writing our first spec
    7:11 Breaking the specs
    7:56 Breaking in practice
    8:39 Fixing specs
    8:58 Push to GitHub
    10:44 Closing notes
    AWS + Rails Series Playlist
    - • AWS + Rails
    My Gear List
    - brain-trust.io/my-gear
    My CZcams 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!
  • Jak na to + styl

Komentáře • 21

  • @BrainTrustDigital
    @BrainTrustDigital  Před 3 lety +2

    ⏰ Timestamps
    0:00 Introduction
    1:11 Gem install
    2:45 RSpec install
    2:59 Run Test Suite
    3:30 Generate a spec
    5:32 Writing our first spec
    7:11 Breaking the specs
    7:56 Breaking in practice
    8:39 Fixing specs
    8:58 Push to GitHub
    10:44 Closing notes

  • @sandeepsoni2770
    @sandeepsoni2770 Před 3 lety +2

    Thank you for considering testing, it will helpful to have more rspec videos

    • @BrainTrustDigital
      @BrainTrustDigital  Před 3 lety

      Definitely let me know if you have any testing related topics you would like me to cover.

  • @stevensanchez727
    @stevensanchez727 Před rokem

    Thanks a lot for the video. It help me a lot. More RSpec videos please! 👌👌👌

  • @joey2545
    @joey2545 Před 3 lety +1

    Nice! Thanks for making this video!

    • @BrainTrustDigital
      @BrainTrustDigital  Před 3 lety

      No problem, please let me know if there are any related topics you would like me to cover!

  • @denisseorellana3956
    @denisseorellana3956 Před rokem

    10:03 You made me laugh so hard haha
    My “coworker”, a golden retriever, is also very busy working with his toy to review my code right now.
    Thank you so much for your videos and all your help!
    Kisses to Bear 🥰

  • @SS-li3ft
    @SS-li3ft Před 2 lety

    Nice video, it really help me alot to understand the basics. Can you please do a session for test the user controller like show edit contents.

  • @connerjensen8170
    @connerjensen8170 Před 2 lety +1

    Great tutorial Thomas!

    • @BrainTrustDigital
      @BrainTrustDigital  Před 2 lety

      Thanks Conner, glad you liked it! Let me know if there are other topics you want me to cover

  • @ingemarandrade277
    @ingemarandrade277 Před 2 lety +1

    Thank you for this video!

    • @BrainTrustDigital
      @BrainTrustDigital  Před 2 lety

      Glad I could help! Please let me know if there’s any topics you would like me to cover.

  • @MoBetta42
    @MoBetta42 Před 3 lety +1

    Loved the video!!! Bear’s cousin really does look like a good boy!

  • @overcomeridemudia3199

    Thank u so much for this.

  • @bernard2560
    @bernard2560 Před 2 lety +1

    My family has the same dog, subscribed!

    • @BrainTrustDigital
      @BrainTrustDigital  Před 2 lety +1

      Love this! What’s your dogs name?

    • @bernard2560
      @bernard2560 Před 2 lety

      @@BrainTrustDigital Florek (it's short from of latin name Florian in polish, so it might sound odd in English)

  • @csvn4816
    @csvn4816 Před 2 lety

    HI O have a error
    An error occurred while loading ./spec/models/order_spec.rb.
    Failure/Error: require 'rails_helper'
    could you tell how to fix this error? thanks very much.

  • @grzegorzwiktorzak247
    @grzegorzwiktorzak247 Před 3 lety

    Hey👋,
    any idea how to solve this one👇
    An error occurred while loading ./spec/models/user_spec.rb. - Did you mean?
    rspec ./spec/spec_helper.rb
    Failure/Error: require File.expand_path('../config/environment', __dir__)
    LoadError:
    cannot load such file -- rexml/document

    • @grzegorzwiktorzak247
      @grzegorzwiktorzak247 Před 3 lety

      followed your steps and error occur in 5:00 of your video
      Thank you for your time