Skip to content

Commit 85536ea

Browse files
committed
Add text to ContextWording docs encouraging configuration
Context descriptions are written in freeform human language, so it is impossible to foresee all acceptable cases. Add text to the documentation encouraging users to configure the list of permitted prefixes to meet their needs. on-behalf-of: @Cofense <[email protected]>
1 parent e76f7d4 commit 85536ea

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/rubocop/cop/rspec/context_wording.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ module Cop
55
module RSpec
66
# Checks that `context` docstring starts with an allowed prefix.
77
#
8-
# @see https://github.com/reachlocal/rspec-style-guide#context-descriptions
8+
# The default list of prefixes is minimal. Users are encouraged to tailor
9+
# the configuration to meet project needs. Other acceptable prefixes may
10+
# include `if`, `unless`, `for`, `before`, `after`, or `during`.
11+
#
12+
# @see https://rspec.rubystyle.guide/#context-descriptions
913
# @see http://www.betterspecs.org/#contexts
1014
#
1115
# @example `Prefixes` configuration

manual/cops_rspec.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ Enabled | No
275275

276276
Checks that `context` docstring starts with an allowed prefix.
277277

278+
The default list of prefixes is minimal. Users are encouraged to tailor
279+
the configuration to meet project needs. Other acceptable prefixes may
280+
include `if`, `unless`, `for`, `before`, `after`, or `during`.
281+
278282
### Examples
279283

280284
#### `Prefixes` configuration

0 commit comments

Comments
 (0)