ruby-testing

Generate RSpec-based Ruby tests for coverage and failure diagnosis.

7|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/chenziyang110/spec-kit-plus --skill ruby-testing-chenziyang110
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ruby-testing
Source: https://github.com/chenziyang110/spec-kit-plus/tree/main/templates/passive-skills/ruby-testing
Command: npx skills add https://github.com/chenziyang110/spec-kit-plus --skill ruby-testing-chenziyang110

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ruby teams waste time and regressions slip through when tests are missing, inconsistent, or hard to debug; this skill helps you produce dependable RSpec coverage and diagnose why failures happen.

Core Features & Use Cases

  • RSpec-focused test generation: Creates unit and Rails-flavored tests using common RSpec patterns to cover behavior clearly (describe/context/it) and support maintainable specs.
  • Failure diagnosis and coverage improvements: Guides investigation of failing or flaky tests, then proposes targeted fixes and additional edge-case coverage.
  • Safer, deterministic workflows: Uses explicit stop conditions (missing frameworks/dependencies, ambiguous requests, or non-testable code) and recommends isolation and anti-flake practices like deterministic setup and time/DB control.

Quick Start

Ask the agent to write RSpec tests for your failing Ruby code and explain how to run them locally with bundle exec rspec.

Frequently Asked Questions about ruby-testing

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

FAQPage Schema
How do I generate RSpec tests for Ruby on Rails models and requests?

RSpec test generation creates unit and Rails-flavored tests using common describe/context/it patterns to cover behavior clearly. You can ask the agent to write these tests for your failing Ruby code to ensure maintainable specs and regression protection.

What is the best way to diagnose flaky RSpec test failures in a Ruby project?

Diagnosing flaky RSpec test failures involves investigating the failing or flaky tests to propose targeted fixes. This skill guides the investigation of failures, recommends isolation practices, and ensures deterministic setup using time and DB control to resolve flaky behavior.

Does this RSpec testing approach work with Ruby 3.2 and Factory Bot?

Yes, this RSpec testing approach works with Ruby 3.2+ projects and supports Factory Bot. It selects appropriate mocking and fixtures for external I/O, applying RSpec conventions to cover scenarios including new test creation and fixing broken specs across your tests.

How do I fix broken Rails request specs when dependencies are missing?

Fixing broken Rails request specs requires applying explicit stop conditions when test dependencies or testability are unclear. This skill follows explicit guardrails to stop and recommends applying RSpec conventions and appropriate mocking to fix broken specs safely.

When should I avoid automated RSpec test generation for my Ruby code?

You should avoid automated RSpec test generation when test dependencies are missing, requests are ambiguous, or the code is non-testable. The skill uses explicit stop conditions to halt generation when frameworks or dependencies are unclear, preventing unreliable coverage.