rspec-best-practices

Community

Master RSpec best practices for Rails tests.

Authorigmarin
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Writing and maintaining reliable RSpec tests for Ruby on Rails apps can be error-prone and hard to scale; this guide consolidates best practices to improve readability, determinism, and test coverage.

Core Features & Use Cases

  • Clear guidance on spec types, factory design, flaky tests, shared examples, deterministic assertions, TDD discipline, and selecting first failing spec.
  • Structured patterns for test organization, naming, and data setup to reduce flakiness and maintenance cost.
  • Guidance on when to write model, controller, system, or job specs to maximize value.

Quick Start

Audit your current RSpec tests and implement the recommended best practices across factories, specs, and example structures.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: rspec-best-practices
Download link: https://github.com/igmarin/rails-agent-skills/archive/main.zip#rspec-best-practices

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.