rspec-agent

Generate RSpec tests for Rails models, controllers, and services using FactoryBot and Capybara.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing thorough tests for Rails applications is time consuming and error prone without a clear, reusable blueprint. This Skill provides a complete approach to generating high-quality RSpec tests across models, controllers, services, queries, presenters, policies, and view components using FactoryBot and Capybara, reducing bugs and speeding up development.

Core Features & Use Cases

  • Unified testing framework: Establishes a consistent structure for unit, integration, and system tests across the Rails stack.
  • FactoryBot & Capybara integration: Demonstrates best practices for factories, test data setup, and end-to-end interactions.
  • Use Case: When starting a new Rails project, apply this Skill to scaffold test suites, ensure coverage from day one, and maintain readability and reusability.

Quick Start

Install and configure RSpec and FactoryBot, then begin adding model, controller, and feature tests following the patterns described.

Frequently Asked Questions about rspec-agent

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

FAQPage Schema
How do I write RSpec tests for Rails 8 models and controllers?

To write RSpec tests for Rails 8, you generate structured specs using FactoryBot for test data and Capybara for interactions. This approach ensures consistent coverage, proper naming conventions, and edge-case handling across models, controllers, and system tests.

What is the best way to structure Rails system tests with Capybara?

The best way to structure Rails system tests with Capybara is to follow a unified framework applying consistent file structures and naming conventions. This ensures maintainability and clear end-to-end interactions across your Rails 8 project.

Can I use FactoryBot and Capybara together for Rails integration testing?

Yes, you can use FactoryBot and Capybara together for Rails integration testing. This combination provides best practices for test data setup and end-to-end interactions, establishing consistent structure for unit, integration, and system tests.

How do I test Rails services, queries, and presenters with RSpec?

To test Rails services, queries, and presenters with RSpec, you apply a complete approach generating high-quality specs across the Rails stack. This establishes consistent coverage, edge-case handling, and linting for ready-to-run specs.

Do I need to configure RSpec and FactoryBot before scaffolding test suites?

Yes, you need to install and configure RSpec and FactoryBot before scaffolding test suites. Once configured, you can begin adding model, controller, and feature tests following documented patterns to ensure coverage from day one.