Skip to content

Commit

Permalink
fixup! Bring back Expectations and Runners to ALL
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj committed Nov 2, 2020
1 parent ef28dfe commit d2d1355
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/rubocop/rspec/language.rb
Expand Up @@ -172,17 +172,11 @@ def self.all(element)
end

# This is used in Dialect and DescribeClass cops to detect RSpec blocks.
# Omission of Expectations and Runners is a deliberate simplification,
# but not a requirement.
module ALL # :nodoc:
def self.all(element)
ExampleGroups.all(element) ||
Examples.all(element) ||
Helpers.all(element) ||
Hooks.all(element) ||
Includes.all(element) ||
SharedGroups.all(element) ||
Subjects.all(element)
[ExampleGroups, Examples, Expectations, Helpers, Hooks, Includes,
Runners, SharedGroups, Subjects]
.find { |concept| concept.all(element) }
end
end

Expand Down

0 comments on commit d2d1355

Please sign in to comment.