testing
/testing
Authoring Ruby/Rails/Grape/Sidekiq tests: request specs, factories, anti-flake. Triggers: \"RSpec patterns\", \"factory setup\", \"flaky test\". Do NOT use for: running tests, executing rspec.
- Author
- slbug ↗
- Repository
- claude-ruby-grape-rails ↗
- Licence
- MIT
- Last repository change
- 01.10.2026
Assessment and security
- Files in this package
- 6
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Authoring Ruby/Rails/Grape/Sidekiq tests: request specs, factories, anti-flake. Triggers: \"RSpec patterns\", \"factory setup\", \"flaky test\". Do NOT use for: running tests, executing rspec.
Triggers from the description
Original author description
Authoring Ruby/Rails/Grape/Sidekiq tests: request specs, factories, anti-flake. Triggers: \"RSpec patterns\", \"factory setup\", \"flaky test\". Do NOT use for: running tests, executing rspec.
How it works
- Good Defaults
- Gotchas
- References
SKILL.md preview
---
name: testing
description: "Authoring Ruby/Rails/Grape/Sidekiq tests: request specs, factories, anti-flake. Triggers: \"RSpec patterns\", \"factory setup\", \"flaky test\". Do NOT use for: running tests, executing rspec."
user-invocable: false
effort: medium
---
# Testing
## Good Defaults
- request specs or API tests for transport behavior
- focused unit tests for service/query objects
- worker tests for enqueue and perform paths
- factories or fixtures that stay small and deterministic
- explicit time and randomness control in flaky paths
## Gotchas
- Factory cycles. `create(:user)` triggers `create(:account)` triggers
`create(:user)` — silent infinite loop. Detect via FactoryBot's
`:build_stubbed` strategy or explicit `:user_without_account`
factory.
- DatabaseCleaner truncation drift. `truncation` strategy doesn't
reset sequences. Tests asserting on auto-increment IDs fail
randomly. Use `transaction` or
`ActiveRecord::Base.connection.reset_pk_sequence!`.
- Time-sensitive flakies. `Time.current` in factory +
`expect(record.created_at).to eq Time.current` — race on test
runner clock. Use `freeze_time` or `Timecop.freeze`.
- RSpec random order seed. Test passing alone but failing in suite is
order-dependent. Reproduce with `rspec --seed SEED_VALUE`; fix via
`before(:each) do; reset_state; end` or split tests.
## References
| Need | Reference |
|---|---|
| verify-before-claiming-done discipline (Iron Law 21) | `${CLAUDE_SKILL_DIR}/references/discipline.md` |
| RSpec patterns (subject, let, contexts, shared examples) | `${CLAUDE_SKILL_DIR}/references/rspec-patterns.md` |
| FactoryBot patterns (build vs create, traits, sequences, transient) | `${CLAUDE_SKILL_DIR}/references/factory-patterns.md` |
| RSpec mocks, instance_double, allow vs expect | `${CLAUDE_SKILL_DIR}/references/mock-patterns.md` |
| Capybara + Turbo Stream + ActionCable system tests | `${CLAUDE_SKILL_DIR}/references/system-testing.md` |
Files in this package (6)
- SKILL.md 2 KB
- references/discipline.md 2 KB
- references/factory-patterns.md 7 KB
- references/mock-patterns.md 6 KB
- references/rspec-patterns.md 6 KB
- references/system-testing.md 8 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · slbug/claude-ruby-grape-rails | 100 | MIT |
| iuliandita/skills | 100 | MIT |
| wrongstack/wrongstack | 100 | MIT |
| langwatch/langwatch | 100 | Apache-2.0 |
| mcouthon/agents | 100 | MIT |
| nteract/nteract | 100 | BSD-3-Clause |
| kettleofketchup/DraftForge | 100 | GPL-3.0 |
| skillberry-ai/cap-evolve | 100 | Apache-2.0 |
| TheBeardedBearSAS/claude-craft | 100 | MIT |
Database snapshot: 13.11.2026 · package version 5dbb1224d69b (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100rails-testing
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… - 100rspec
Comprehensive RSpec testing for Ruby and Rails applications. Covers model specs, request specs, system specs, factories, mocks, and TDD workflow. Automatically triggers on RSpec-related keywords and testing scenarios. - 100intent-detection
Routing Ruby/Rails/Grape/Sidekiq/AR/Sequel/Hotwire work to the correct /rb: command BEFORE doing it. Pushy gateway, never blocks. Triggers: \"my Rails app\", \"which command\", multi-step task. Do NOT use when user typed /rb:<name>. - 95rspec-testing
This skill should be used when writing, reviewing, or improving RSpec tests for Ruby on Rails applications. Use this skill for all testing tasks including model specs, controller specs, system specs, component specs, service specs, and integration tests. The skill provides… - 100rspec
Expert RSpec testing assistance covering Ruby BDD testing, mocks, expectations, and let/subject helpers. Use when writing Rails/Ruby tests, testing controllers/models, or running `bundle exec rspec`. - 90rb:learn
Capturing in-flight lessons when the user corrects your approach or teaches a pattern: ActiveRecord, Rails, Grape, Sidekiq mistakes during work. Writes lightweight learning notes.