Skip to content

Commit 218d2a0

Browse files
authored
Merge pull request #861 from Cofense/context-wording-new-words
Encourage users to customize the permitted word list in `RSpec/ContextWording` (was: Add `before` and `after` to default list)
2 parents e76f7d4 + 85536ea commit 218d2a0

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)