rails-testing

Configure a Rails 8.1 test suite with framework, data, driver, and coverage options.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/jcuervo/rails-skills --skill rails-testing-jcuervo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-testing
Source: https://github.com/jcuervo/rails-skills/tree/main/rails-testing
Command: npx skills add https://github.com/jcuervo/rails-skills --skill rails-testing-jcuervo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the setup and configuration of a Rails 8.1 app's test suite. It helps choose and configure the test framework, test data strategy, system-test driver, and coverage tool, making test suite creation more efficient and effective.

Core Features & Use Cases

  • Framework Configuration: Select between Minitest and RSpec, the two primary Rails testing frameworks.
  • Test Data Strategy: Decide on fixtures or FactoryBot for test data management.
  • System-Test Driver: Choose from Selenium + Chrome, Cuprite (CDP), or rack_test for browser-based testing.
  • Coverage: Utilize SimpleCov for line and branch coverage reporting.
  • Use Case: When you need to add a test suite, set up your testing stack, write factories/fixtures, or test UI flows with coverage.

Quick Start

Generate a test suite for your Rails 8.1 app by invoking 'rails-testing'.

Frequently Asked Questions about rails-testing

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

FAQPage Schema
How do I set up a Rails 8.1 test suite with RSpec or Minitest?

To set up a Rails 8.1 test suite, you can use a menu-driven approach to select your testing framework, choosing between RSpec and Minitest. The process then configures model, request, and system tests across the test pyramid.

What is the best way to configure system test drivers in a Rails application?

Configuring system test drivers in a Rails application involves choosing a browser-based testing tool. You can select Selenium with Chrome, Cuprite via CDP, or rack_test to drive your UI flow tests.

Should I use fixtures or FactoryBot for Rails test data management?

Choosing between fixtures or FactoryBot for Rails test data management depends on your strategy preference. The test suite setup provides a menu-driven option to configure either fixtures or FactoryBot for your test data generation.

Does this Rails testing setup support both web and API-only applications?

Yes, the Rails testing setup supports both web and API-only applications. It handles model, request/controller, and system tests across the test pyramid specifically tailored for either web or API-only Rails 8.1 contexts.

How do I add SimpleCov coverage reporting to a Rails test suite?

To add SimpleCov coverage reporting to a Rails test suite, select it as your coverage tool during the menu-driven setup. This integrates SimpleCov to provide line and branch coverage reporting for your tests.

What are the limitations of using rack_test for Rails system tests?

A key limitation of using rack_test for Rails system tests is that it lacks JavaScript support, unlike Selenium or Cuprite. It is a fast driver but should only be selected for simple UI flows that do not require browser execution.