Loading…
0+ curated questions with the same answer shape every time: quick recap, deep dive, pitfalls, and follow-ups. Coverage includes .
FactoryBot and Capybara are the standard Rails test data and system testing tools — and both have depth that separates senior candidates from juniors. This module covers FactoryBot factory definition, traits, sequences, associations, and the build_stubbed vs build vs create cost hierarchy (build_stubbed: no database hit, fastest; build: in-memory AR object; create: database write), after(:create) hooks and their performance cost, FactoryBot linting to catch invalid factories, Capybara visit/fill_in/click_button/have_text for system tests, js: true and headless Chrome configuration, have_current_path matcher, Shoulda Matchers for model validation testing, DatabaseCleaner strategies (transaction for unit tests, truncation for JS system tests that use multiple threads), and driven_by configuration.
Full catalog
Topics are ordered for learning. Within each topic, rows are numbered 1–0 globally so you always know where you are. Collapse topics if you want a lighter view — use Expand all when you need the full list again.
Numbers 1–0 follow the order we recommend — click any row to open the full answer, or use the sticky Next link at the bottom of each page to go Q1 → Q0.