Загрузка...

Rails 8 Chat App – Part 2: Testing with Minitest, Capybara & System Tests

Welcome to Part 2 of my Rails 8 Chat App series!

In this video, I walk you through my complete Rails testing strategy using Minitest, FactoryBot, Capybara, and custom helpers — from unit and controller tests to full system tests.

This isn't just about green dots.

We’ll explore:
- How I name and structure tests for controllers, models, integration, and system
- Why I use one test per file for system tests (yes, because of dialog)
- My custom test helpers for keyboard navigation, focus restoration, and Turbo Streams
- Why I run system tests with a custom find command (not rails test:system)
- How I use flow tests to bridge integration and system levels

Whether you're new to Minitest or refining your test architecture — this walkthrough might give you some new ideas.

---
Chapters:
00:00 - Welcome
00:12 - Sneak peek into Part 3 (Documentation)
02:15 - Controller tests
08:00 - Factories
08:43 - Helpers tests
09:15 - Integration tests
10:45 - Model tests
13:45 - System tests
14:45 - Sign in / out on mobile
15:13 - System chats edit test
16:10 - Chat edit with keyboard
17:02 - Drawer tests
18:54 - Main navigation test

---

References & Links

▶️ Watch Part 1: Rails 8 Setup, UI & Accessibility
https://youtu.be/PBKgxrDKwLc

▶️ Watch Part 3: Rails Documentation & AI Guidelines
https://youtu.be/8o3wrLxDPww

▶️ Watch Part 3.1: Lazy AI • Refactored Docs • Final Push
https://youtu.be/IEWrLQ2xttk

▶️ Watch Part 4: Copy to Clipboard with Dispatch and Flash Messages
https://youtu.be/sXoDR-JZTpw

▶️ Bonus Screencast – Headless Chrome Issue: Rails 8 Chat App System Minitest
https://youtu.be/E1CZwMdSzl8

💻 Raindy GitHub Repo
- https://github.com/aindy-eu/raindy

---

Credits:
Elevator Music by Mykola Odnoroh on Pixaby
https://pixabay.com/users/lkoliks-48415707/

---

#Rails8 #Minitest #Capybara #SystemTesting #ChatApp #Hotwire #StimulusJS #TurboStreams #TestDrivenDevelopment #AIWorkflow

Видео Rails 8 Chat App – Part 2: Testing with Minitest, Capybara & System Tests канала Aindy
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять