Loading...
Loading...
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, request specs, system tests, factory definitions, Capybara interactions, Sidekiq job tests, or test suite optimization. Complementary to rails-dev, ruby-optimise, and ruby-refactor skills.
npx skill4agent add pproenca/dot-skills rails-testing| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 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 | |
design-four-phase-testdesign-behavior-over-implementationdesign-one-assertion-per-testdesign-descriptive-test-namesdesign-avoid-mystery-guestdesign-avoid-conditional-logicdesign-explicit-subjectdata-factory-traitsdata-minimal-attributesdata-build-over-createdata-avoid-fixture-couplingdata-transient-attributesdata-sequence-unique-valuesmodel-test-validationsmodel-test-associationsmodel-test-scopesmodel-test-callbacks-sparinglymodel-test-custom-methodsmodel-avoid-testing-frameworkmodel-test-enumsrequest-over-controller-specsrequest-test-response-statusrequest-test-authenticationrequest-test-authorizationrequest-test-params-validationrequest-json-response-structuresystem-page-objectssystem-use-accessible-selectorssystem-avoid-sleepsystem-test-critical-pathssystem-database-statesystem-screenshot-on-failureasync-separate-enqueue-from-performasync-use-fake-mode-defaultasync-test-job-performasync-test-mailer-deliveryasync-test-after-commitperf-parallel-testsperf-database-strategyperf-profile-slow-specsperf-quarantine-flaky-testsperf-avoid-before-all-mutationorg-avoid-deep-nestingorg-shared-examples-sparinglyorg-custom-matchersorg-file-structure-mirrors-app| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |