How to Create Next and Previous Links with Test Driven Development (TDD)

Опубликовано: 16 Февраль 2026
на канале: BrainTrust Digital
634
25

In this AWS + Rails Beginner Testing tutorial we walk through how to create next and previous links with test driven development (TDD) in your Ruby on Rails 6 app. I will include testing terminology and process to create the feature. We use RSpec for our test suite, but the concepts apply if you prefer a different automated test suite.

I have tutorials linked below if you would like to set up your test suite with RSpec and Factory Bot in a Ruby on Rails 6 app.

⏰ Timestamps
0:00 Introduction
1:33 Run test suite
2:00 Create git branch
2:15 Generate migrations
4:26 Create video spec
7:38 First failure
8:12 Pass spec
8:56 Refactor spec
9:48 New problem
10:24 Add next context
11:33 Fix next code
12:04 Add previous context
12:34 Fix previous code
12:59 Red, Green, Refactor
15:54 Update views
16:30 Verify in browser
17:00 Push to GitHub
17:50 Deploy
18:29 Verify Production
18:55 Closing notes

Tutorials referenced in this video
RSpec Tutorial for Beginners
   • RSpec Tutorial for Beginners  

Factory Bot Tutorial for Beginners
   • Factory Bot Tutorial for Beginners  

How to use Git and GitHub for your Rails Application
   • How to use Git and GitHub for your Rails A...  

How to Deploy Your First Rails App to Amazon EC2
   • How to Deploy Your First Rails App to Amaz...  

AWS + Rails Series Playlist
   • AWS + Rails  

My Gear List
http://brain-trust.io/my-gear

My YouTube SEO Software
https://www.tubebuddy.com/braintrust

My Accounting Software
https://shareasale.com/r.cfm?b=960179...

Try Audible and Get Two Free Audiobooks
https://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!