Planning: one model, TDD from the first line

Free preview 3 min to read

Ninety-six courses, one thing left to build

The ninety-six junior courses before this one each taught a piece: ActiveRecord depth, controller mechanics, RSpec's toolkit, Git workflows, code review, AI used with care. None of them, on its own, built a working, fully tested app end to end. That's this capstone's job, across seven lessons. It builds a small task tracker, Task Tracker Pro, with the discipline "Testing culture: RGR cycle" named: the test comes first, every time. That's the order each lesson below follows, not a rule recited once.

What this app needs to do

One model, Task, with a title, a status (pending, doing, done), a priority (low, medium, high) and a due_on date. Four actions: list every task, create one, mark one done, and see which ones are overdue. It's small on purpose. This capstone is about the process of building it correctly, not about the number of features.

Why RSpec first, not styling first

"Capstone: personal blog", this catalog's intern-level capstone, closed with a styling lesson built on this app's Tailwind tokens, a deliberate choice for a course about visual polish. This course's description sets a different goal: "Building a fully tested app with RSpec and AI". So there's no styling lesson here. That's a scope decision matching the goal, not an oversight.

Red-green-refactor, from where this catalog defined it

"Testing culture: RGR cycle" set out the discipline this app follows, and its second lesson's title states the first rule: "Red: a test that never failed never proved anything". Every feature in this app, starting next lesson, gets a spec written and run before the code it tests exists. You watch it fail for a specific reason before writing a line of implementation to satisfy it.

The order, stated up front

Lesson 2 writes Task's model spec and runs it, red, against a model that doesn't exist. Lesson 3 writes the migration, the model and a factory, the smallest change that turns it green. Lesson 4 runs the same cycle one layer up: a request spec first, then the routes and controller. Lesson 5 adds a system spec, Capybara driving a browser-shaped flow, then the views that satisfy it. Lesson 6 brings in AI for one feature, checked and reviewed with the discipline from "Code reviews: principles" instead of trusted blindly. Lesson 7 runs the whole suite green and closes the build. After it, the junior level ends with four interview-preparation courses.

Where this leaves you

You don't get a finished app handed to you. You watch one get built, test first, in the order an engineer would build it under the discipline this catalog has taught in pieces.

Lesson 1 of 7 · free

Keep going with lesson 2

Red: a model spec for a model that doesn't exist yet

Writes the Task model spec and runs it red, failing with NameError because nothing exists yet.

A free account also gives you the quizzes, your progress and notes, and the discussion.

Type to start searching...