Skip to content

Commit d2d1355

Browse files
committed
fixup! Bring back Expectations and Runners to ALL
1 parent ef28dfe commit d2d1355

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

lib/rubocop/rspec/language.rb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,11 @@ def self.all(element)
172172
end
173173

174174
# This is used in Dialect and DescribeClass cops to detect RSpec blocks.
175-
# Omission of Expectations and Runners is a deliberate simplification,
176-
# but not a requirement.
177175
module ALL # :nodoc:
178176
def self.all(element)
179-
ExampleGroups.all(element) ||
180-
Examples.all(element) ||
181-
Helpers.all(element) ||
182-
Hooks.all(element) ||
183-
Includes.all(element) ||
184-
SharedGroups.all(element) ||
185-
Subjects.all(element)
177+
[ExampleGroups, Examples, Expectations, Helpers, Hooks, Includes,
178+
Runners, SharedGroups, Subjects]
179+
.find { |concept| concept.all(element) }
186180
end
187181
end
188182

0 commit comments

Comments
 (0)