tdd-cycle

Guide Ruby on Rails developers through Red-Green-Refactor cycles with RSpec.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/reckerswartz/resume_builder --skill tdd-cycle-reckerswartz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-cycle
Source: https://github.com/reckerswartz/resume_builder/tree/main/.windsurf/skills/tdd-cycle
Command: npx skills add https://github.com/reckerswartz/resume_builder --skill tdd-cycle-reckerswartz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers through the Test-Driven Development cycle, helping them structure work around Red-Green-Refactor to improve code quality and reduce defects.

Core Features & Use Cases

  • Structured workflow: teaches how to plan tests before implementation and iterate via the RED, GREEN, and REFACTOR phases.
  • Practical guidance: covers choosing test types, writing failing specs, and validating through refactoring.
  • Use Case: a feature request can be implemented following a disciplined TDD cycle to ensure correctness from the outset.

Quick Start

Start a guided TDD session by writing a failing spec, then implement the minimal code to pass the spec and refactor while maintaining green tests.

Frequently Asked Questions about tdd-cycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply the TDD Red-Green-Refactor cycle in Rails?

To apply the TDD Red-Green-Refactor cycle in Rails, start by writing a failing RSpec spec, implement the minimal code to turn it green, and then refactor while keeping tests passing. This enforces a structured workflow for feature development.

What is the best way to structure a Test-Driven Development workflow?

A structured Test-Driven Development workflow involves choosing the appropriate test types, writing a failing spec, running the tests to confirm failure, implementing minimal code to pass, and performing iterative refactors with safety checks to maintain green tests.

Can I use RSpec for TDD refactoring in Ruby on Rails?

Yes, you can use RSpec for TDD refactoring in Ruby on Rails. The workflow specifically covers writing failing RSpec specs, implementing minimal code to pass the specs, and refactoring while validating through continuous test runs to maintain green tests.

When do I need to choose specific test types during the TDD cycle?

Choosing specific test types during the TDD cycle happens during the initial planning phase before implementation. Selecting the right test type upfront ensures your failing specs accurately validate the intended feature behavior before you write the minimal passing code.

Does the TDD cycle work without existing test dependencies?

Yes, the TDD cycle workflow operates without external dependencies. It provides the structured reasoning needed to guide your Red-Green-Refactor sessions directly within your Ruby on Rails and RSpec environment without requiring additional installed components.