red-test-patterns

Generate RED phase Minitest test templates for Rails components.

1|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/LaunchPadLab/ai-bank --skill red-test-patterns
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: red-test-patterns
Source: https://github.com/LaunchPadLab/ai-bank/tree/main/claude/skills/red-test-patterns
Command: npx skills add https://github.com/LaunchPadLab/ai-bank --skill red-test-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you quickly create correct failing (RED phase) Minitest tests before any implementation exists, so you can drive development with clear expectations instead of guessing.

Core Features & Use Cases

  • RED-first test templates by component type: Covers new model, service, controller, view component, and policy tests with appropriate structure.
  • Expected failure guidance: Includes the typical error message you should see when the target code (class/route/component/policy) does not exist yet.
  • Fixture setup for RED tests: Provides example fixture data to support failing tests that depend on associated records.
  • Run commands and selection tips: Shows how to run a single file, target a specific test by name, or run an entire directory to verify failures.

Quick Start

Use the red-test-patterns skill to draft the first failing RED test for your new Rails component, including the matching fixtures and the command to run it to confirm it fails for the right reason.

Frequently Asked Questions about red-test-patterns

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

FAQPage Schema
How do I write a failing RED phase test in Minitest before implementing a Rails model?▼

To write a RED phase test, you generate a Minitest template expecting a specific failure, such as a NameError for a missing model. This approach drives development with clear expectations by validating the test fails for the correct reason before code exists.

What is the best way to set up fixtures for failing Rails controller tests?▼

The best way to set up fixtures for failing Rails controller tests is to define example fixture data supporting associated records. This ensures your RED phase tests have the necessary database state to fail correctly due to missing implementation rather than missing test data.

Can I use TDD patterns to generate Minitest templates for Rails service objects and policies?▼

Yes, you can generate RED phase Minitest templates for Rails service objects and policies. The templates provide the appropriate test structure, expected failure guidance, and run commands to verify the missing class or policy fails first.

How do I run a single Minitest file to verify my RED test fails for the right reason?▼

You can run a single Minitest file or target a specific test by name using provided run commands. This isolates the failing RED test, confirming it fails because the target route, class, or component does not exist yet.

Why does my Rails view component test fail before the component is created?▼

A Rails view component test fails before creation because the RED phase template expects the component class to be missing. This controlled failure validates your TDD workflow, ensuring the implementation must be built to satisfy the expected test behavior.

Do I need existing implementation code to start TDD with Minitest in Rails?▼

No, you do not need existing implementation code to start TDD. You can draft complete failing Minitest test files with expected failure behavior and fixture guidance before any models, controllers, or service objects exist.