Skip to content

Commit eacc819

Browse files
committed
Add RSpec command usage instructions to documentation
1 parent a26de75 commit eacc819

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/copilot-instructions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ This repository contains the **Better Together Community Engine** (an isolated R
201201
- Ensure blobs are encrypted at rest
202202
- **Testing**
203203
- RSpec (if present) or Minitest – follow existing test framework
204+
- **RSpec command usage**:
205+
- Single spec file: `bundle exec rspec spec/path/to/file_spec.rb`
206+
- Specific line: `bundle exec rspec spec/path/to/file_spec.rb:123`
207+
- Multiple files: `bundle exec rspec spec/file1_spec.rb spec/file2_spec.rb`
208+
- Multiple specific lines: `bundle exec rspec spec/file1_spec.rb:123 spec/file2_spec.rb:456`
209+
- **IMPORTANT**: RSpec does NOT support hyphenated line ranges (e.g., `spec/file_spec.rb:123-456` is INVALID)
210+
- Use individual line numbers or run the full spec file instead
204211
- **Test-Driven Development (TDD) Required**: Use stakeholder-focused TDD approach for all features
205212
- **Define acceptance criteria first**: Before writing code, define stakeholder acceptance criteria using `docs/tdd_acceptance_criteria_template.md` as template
206213
- **Red-Green-Refactor cycle**: Write failing tests first (RED), implement minimal code to pass (GREEN), refactor while maintaining tests (REFACTOR)

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ Instructions for GitHub Copilot and other automated contributors working in this
2020
## Commands
2121
- **Tests:** `bin/ci`
2222
(Equivalent: `cd spec/dummy && bundle exec rspec`)
23+
- **Running specific tests:**
24+
- Single spec file: `bundle exec rspec spec/path/to/file_spec.rb`
25+
- Specific line: `bundle exec rspec spec/path/to/file_spec.rb:123`
26+
- Multiple files: `bundle exec rspec spec/file1_spec.rb spec/file2_spec.rb`
27+
- Multiple specific lines: `bundle exec rspec spec/file1_spec.rb:123 spec/file2_spec.rb:456`
28+
- **Important**: RSpec does NOT support hyphenated line numbers (e.g., `spec/file_spec.rb:123-456` is INVALID)
2329
- **Lint:** `bundle exec rubocop`
2430
- **Security:** `bundle exec brakeman --quiet --no-pager` and `bundle exec bundler-audit --update`
2531
- **Style:** `bin/codex_style_guard`

0 commit comments

Comments
 (0)