rspec-testing-pyramid

Community

Eliminate slow, flaky Rails RSpec test suites.

Authorsandeepmvl
Version1.0.0
Installs0

System Documentation

What problem does it solve?

AI-generated Rails RSpec test suites are often slow, flaky, and ignore team conventions: they overuse system specs, hardcode test data instead of using factories, hit real external APIs, and lack proper setup for parallel testing or coverage tracking, leading to wasted CI time and ignored test failures.

Core Features & Use Cases

  • Testing Pyramid Enforcement: Guides teams to prioritize fast model and request specs over slow system specs, cutting test suite runtime and reducing flakiness.
  • FactoryBot Best Practices: Provides idiomatic patterns for sequences, traits, and associations to create maintainable test data that avoids uniqueness validation failures and brittle setup.
  • Full Tooling Integration: Includes drop-in templates for spec_helper.rb, rails_helper.rb, and .rspec, plus patterns for VCR/WebMock to stub external APIs, Cuprite for fast headless system specs, transactional test database strategies, parallel testing setup, and SimpleCov coverage thresholds.
  • Real-World Use Case: For example, if your team's RSpec suite takes 25 minutes to run and has intermittent flaky system specs, this skill guides you to convert non-JS system specs to request specs, add parallel testing for large suites, and fix N+1 queries that slow down spec execution.

Quick Start

Use the rspec-testing-pyramid skill to refactor your slow, flaky Rails RSpec test suite into a fast, deterministic testing pyramid with proper FactoryBot usage and VCR stubs for external API calls.

Dependency Matrix

Required Modules

None required

Components

assets

💻 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-testing-pyramid
Download link: https://github.com/sandeepmvl/rails-skills/archive/main.zip#rspec-testing-pyramid

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 536,000+ vetted skills library on demand.