Skip to content
BeClaude

rspec

New
32Community RegistryGeneralby hoblin

RSpec and FactoryBot testing patterns for Rails

Summary

This skill provides expert guidance on RSpec and FactoryBot testing patterns for Rails applications, helping you write clear, maintainable tests with best practices for models, controllers, and system specs.

Overview

![License: MIT](https://opensource.org/licenses/MIT) ![Claude Code](https://github.com/anthropics/claude-code)

A Claude Code plugin marketplace for Ruby development: Rails applications, testing, game development with DragonRuby, and terminal UI development with RatatuiRuby.

Installation

bash
/plugin marketplace add hoblin/claude-ruby-marketplace

Available Plugins

Rails Development

  • `ruby-lsp` (LSP) - Ruby language server (Shopify's ruby-lsp) *
  • `rspec` (Skill) - RSpec and FactoryBot testing patterns
  • `draper` (Skill) - Draper decorator patterns for view logic
  • `activerecord` (Skill) - ActiveRecord patterns for models and queries
  • `mcp` (Skill) - MCP server development with Ruby SDK

\* LSP plugins broken since v2.0.69 (#13952) - use v2.0.67 or wait for fix

Game Development

  • `dragonruby` (Skill) - DragonRuby Game Toolkit for 2D games

Covers game loop, input handling, entities, collision detection, audio, rendering, animation, scenes, and cross-platform distribution.

TUI Development

Covers managed loop, 20+ widgets, constraint-based layouts, event handling, styling, testing infrastructure, and Rooibos/Kit frameworks.

Development Tools

  • `rpi` (Workflow) - Research, Planning, Implementation - context engineering for AI-assisted development

Installing Plugins

bash
# Rails plugins
/plugin install rspec@claude-ruby-marketplace
/plugin install activerecord@claude-ruby-marketplace
/plugin install draper@claude-ruby-marketplace

# Game development
/plugin install dragonruby@claude-ruby-marketplace

# TUI development
/plugin install ratatui-ruby@claude-ruby-marketplace

# Development tools
/plugin install rpi@claude-ruby-marketplace

For Contributors

See CLAUDE.md for development guidelines.

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT

Install & Usage

1
Add a marketplace
/plugin marketplace add <org/repo>
2
Install the plugin

Add the configuration to /plugin install rspec@<marketplace>

3
Manage with /plugin
/plugin

Use Cases

Generate RSpec tests for a new Rails model with validations and associations.
Set up FactoryBot factories with traits and sequences for efficient test data.
Write controller specs using request specs and shared examples.
Create system specs with Capybara for end-to-end browser testing.
Refactor existing tests to use let, subject, and context blocks for better organization.
Implement test doubles and stubs for external API calls in service objects.

Usage Examples

1

/rspec Write a factory for a User model with email, name, and admin trait.

2

/rspec Generate request specs for the PostsController CRUD actions.

3

Create a system spec for user sign-up flow using FactoryBot and Capybara.

View source on GitHub
testing

Security Audits

LicenseUnknownSourceWarnRepositoryPass

Frequently Asked Questions

What is rspec?

This skill provides expert guidance on RSpec and FactoryBot testing patterns for Rails applications, helping you write clear, maintainable tests with best practices for models, controllers, and system specs.

How to install rspec?

To install rspec: add a marketplace (/plugin marketplace add <org/repo>), then add the config to /plugin install rspec@<marketplace>. Finally, /plugin in Claude Code.

What is rspec best for?

rspec is a plugin categorized under General. It is designed for: testing. Created by hoblin.

What can I use rspec for?

rspec is useful for: Generate RSpec tests for a new Rails model with validations and associations.; Set up FactoryBot factories with traits and sequences for efficient test data.; Write controller specs using request specs and shared examples.; Create system specs with Capybara for end-to-end browser testing.; Refactor existing tests to use let, subject, and context blocks for better organization.; Implement test doubles and stubs for external API calls in service objects..