rspec-fundamentals_skill

This skill helps you master RSpec fundamentals including describe, context, it blocks, let, and basic matchers for reliable Ruby testing.
  • TypeScript

88

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill thebushidocollective/han --skill rspec-fundamentals

  • SKILL.md11.1 KB

Overview

This skill teaches RSpec fundamentals for behavior-driven development: describe/context/it blocks, let, and basic matchers. It focuses on idiomatic patterns, configuration basics, and practical examples that help teams write clear, maintainable specs. Use it to build a solid foundation before adopting advanced RSpec features or CI integration.

How this skill works

The skill inspects common RSpec constructs and demonstrates how to structure examples, group behavior, and manage test state with let and hooks. It provides configuration guidance, patterns for modular tests, and examples of common matchers and assertions. Practical snippets show setup, error handling, and strategies to optimize spec performance and reliability.

When to use it

  • Setting up RSpec in a new Ruby project
  • Teaching team members BDD basics and conventions
  • Refactoring messy or inconsistent spec suites
  • Preparing RSpec for CI/CD pipelines
  • Troubleshooting failing specs and configuration issues

Best practices

  • Follow RSpec naming and folder conventions for discoverability
  • Prefer focused examples: one expectation per behavior when practical
  • Use let for memoized values and avoid excessive stubbing
  • Keep specs fast — profile slow examples and run them in isolation
  • Document non-obvious configuration choices in spec_helper or rails_helper

Example use cases

  • Create a new spec layout with describe/context/it to express behavior clearly
  • Replace duplicated setup with let and shared_examples to DRY your suite
  • Integrate specs into CI with a fast, deterministic configuration
  • Migrate tests from another framework into idiomatic RSpec examples
  • Profile and optimize slow examples using tagging and parallelization

FAQ

Use let for lazy, memoized values that are used by examples; use before for imperative setup or when side effects are required for multiple examples.

How many expectations per it block is ideal?

Aim for one primary behavior per it block; multiple assertions are fine when they verify different facets of the same behavior, but avoid unrelated expectations.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
rspec-fundamentals skill by thebushidocollective/han | VeilStrat