Rails testing

From pproenca/dot-skills · View interactive version

Rails testing is an AI agent skill from the GitHub repository pproenca/dot-skills. Ruby on Rails testing best practices for writing effective, maintainable test suites with RSpec. This skill should be used when writing, reviewing, or refactoring Rails tests to ensure proper test design, data management, and coverage patterns. Triggers on tasks involving RSpec specs, model tests, r

How to use this skill

Skill file

Community Ruby on Rails Testing Best Practices

Comprehensive testing guide for Ruby on Rails applications, maintained by Community. Contains 46 rules across 8 categories, prioritized by impact to guide automated test generation, review, and refactoring.

When to Apply

Reference these guidelines when:

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | Test Design & Structure | CRITICAL | design- |

| 2 | Test Data Management | CRITICAL | data- |

| 3 | Model Testing | HIGH | model- |

| 4 | Request & Controller Testing | HIGH | request- |

| 5 | System & Acceptance Testing | MEDIUM-HIGH | system- |

| 6 | Async & Background Job Testing | MEDIUM | async- |

| 7 | Test Performance & Reliability | MEDIUM | perf- |

| 8 | Test Organization & Maintenance | LOW-MEDIUM | org- |

Quick Reference

1. Test Design & Structure (CRITICAL)

2. Test Data Management (CRITICAL)

3. Model Testing (HIGH)

4. Request & Controller Testing (HIGH)

5. System & Acceptance Testing (MEDIUM-HIGH)

6. Async & Background Job Testing (MEDIUM)

7. Test Performance & Reliability (MEDIUM)

8. Test Organization & Maintenance (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

| File | Description |

|------|-------------|

| references/_sections.md | Category definitions and ordering |

| assets/templates/_template.md | Template for new rules |

| metadata.json | Version and reference information |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.