RSpec Tutorial for Beginners
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
⏰ 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
Thank you for considering testing, it will helpful to have more rspec videos
Definitely let me know if you have any testing related topics you would like me to cover.
Thanks a lot for the video. It help me a lot. More RSpec videos please! 👌👌👌
Nice! Thanks for making this video!
No problem, please let me know if there are any related topics you would like me to cover!
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 🥰
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.
Great tutorial Thomas!
Thanks Conner, glad you liked it! Let me know if there are other topics you want me to cover
Thank you for this video!
Glad I could help! Please let me know if there’s any topics you would like me to cover.
Loved the video!!! Bear’s cousin really does look like a good boy!
He’s the goodest
Thank u so much for this.
My family has the same dog, subscribed!
Love this! What’s your dogs name?
@@BrainTrustDigital Florek (it's short from of latin name Florian in polish, so it might sound odd in English)
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.
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
followed your steps and error occur in 5:00 of your video
Thank you for your time