rspec

Automate RSpec testing for Ruby and Rails model, request, and system specs.

2|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/damacus/agent-skills --skill rspec-damacus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rspec
Source: https://github.com/damacus/agent-skills/tree/main/skills/rspec
Command: npx skills add https://github.com/damacus/agent-skills --skill rspec-damacus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and maintaining robust tests for Ruby and Rails apps can be time-consuming and error-prone. This skill provides pragmatic strategies, patterns, and examples to improve test quality, readability, and reliability.

Core Features & Use Cases

  • Comprehensive guidance for Model, Request, and System specs, including validations, associations, and end-to-end workflows.
  • Matchers, factories, mocks, and shared examples to accelerate test-writing.
  • Practical patterns and starter templates to apply TDD/BDD in Rails projects.

Quick Start

Run a complete RSpec suite in your Rails project to validate models, controllers, and system interactions.

Frequently Asked Questions about rspec

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

FAQPage Schema
How do I write RSpec tests for Ruby on Rails models covering validations and associations?

RSpec tests for Rails models use matchers and shared examples to validate associations and behaviors. FactoryBot generates test data, ensuring comprehensive coverage for validations and end-to-end workflows.

What is the best way to structure request and system specs in a Rails application?

The best way to structure request and system specs is using consistent patterns, mocks, and factories. This standardizes end-to-end workflow testing and ensures reliable validations across controllers and system interactions.

Do I need FactoryBot and Capybara to run RSpec tests for Rails?

You need standard Ruby on Rails tooling including RSpec, FactoryBot, and Capybara where applicable. These provide the factories and browser simulation required to automate high-quality testing.

How can I apply TDD and BDD patterns to accelerate writing Ruby tests?

You accelerate Ruby test-writing by applying TDD and BDD patterns using starter templates and shared examples. This promotes consistent structure, mocks, and factories throughout the application.

Why are my RSpec mocks and factories causing maintenance issues in my Ruby app?

RSpec mocks and factories cause maintenance issues without pragmatic patterns. Applying consistent structure and shared examples improves test quality, readability, and reliability across model and request specs.