minitest-testing

Write and improve Minitest tests for Ruby on Rails applications.

14|Updated Dec 16, 2025
One-click install
npx skills add https://github.com/Shoebtamboli/rails_claude_skills --skill minitest-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: minitest-testing
Source: https://github.com/Shoebtamboli/rails_claude_skills/tree/main/lib/generators/claude/skills_library/minitest-testing
Command: npx skills add https://github.com/Shoebtamboli/rails_claude_skills --skill minitest-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Many Rails applications have incomplete, brittle, or inconsistent tests that make refactors risky and slow down delivery. This Skill helps engineers write, review, and improve Minitest tests so test suites are reliable, fast, and aligned with Rails conventions.

Core Features & Use Cases

  • Model, Controller, and System Test Patterns: Provides idiomatic examples for validations, associations, HTTP behavior, and end-to-end workflows with Capybara and Turbo.
  • Fixtures & Test Helpers: Demonstrates fixture usage, setup/teardown patterns, authentication helpers, and custom assertions to reduce duplication.
  • Debugging & Coverage Guidance: Helps diagnose failing tests, suggests fixes, recommends assertions, and shows how to run tests in parallel and collect coverage with SimpleCov.
  • Use Cases: Writing new tests for models/controllers, converting flaky feature specs to stable system tests, fixing CI test failures, and adding Turbo/Hotwire-aware system tests.

Quick Start

Ask the assistant to review failing tests in test/models/article_test.rb, identify root causes, and propose corrected test code and fixture updates.

Frequently Asked Questions about minitest-testing

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

FAQPage Schema
How do I write Minitest tests for Rails models and controllers?

To write Minitest tests for Rails, use idiomatic assertions for validations, associations, and HTTP behavior. This Skill provides model and controller test patterns, including fixture setup and custom test helpers, to reduce duplication and align with Rails conventions.

What's the best way to fix flaky Capybara system tests in Rails?

Fix flaky Capybara system tests by converting them to stable patterns with Hotwire and Turbo awareness. This Skill helps diagnose failing tests, propose corrected code, and provide Capybara-compatible system test patterns that work reliably in both development and CI workflows.

How do I set up fixtures and test helpers in Minitest?

Set up Minitest fixtures and test helpers by using standard setup and teardown patterns alongside custom assertions. This Skill demonstrates fixture usage and authentication helpers to reduce duplication and enforce Rails testing conventions for reliable test suites.

Can I run Minitest in parallel and collect coverage with SimpleCov in Rails?

Yes, you can run Minitest in parallel and collect coverage with SimpleCov. This Skill provides guidance on configuring parallel test execution and integrating coverage tooling to help diagnose failing tests and improve overall test suite reliability.

Why does my Turbo and Hotwire system test fail in CI but pass locally?

Turbo and Hotwire system tests may fail in CI due to timing or environment differences. This Skill helps debug failing tests by providing Capybara-compatible system test patterns specifically designed for testing Turbo behaviors consistently across development and CI workflows.

Does Minitest work with Capybara for Rails end-to-end testing?

Minitest works with Capybara for Rails end-to-end testing through system tests. This Skill provides Capybara-compatible patterns for end-to-end workflows, including authentication helpers and specific assertions to ensure reliable coverage of user interactions and Turbo behaviors.