Class: RuboCop::Cop::RSpec::ScatteredLet
- Defined in:
- lib/rubocop/cop/rspec/scattered_let.rb
Overview
Checks for let scattered across the example group.
Group lets together
Constant Summary collapse
- MSG =
'Group all let/let! blocks in the example group together.'.freeze
Constants inherited from Cop
Cop::DEFAULT_CONFIGURATION, Cop::DEFAULT_PATTERN_RE
Constants included from RSpec::Language
Instance Method Summary collapse
Methods inherited from Cop
Instance Method Details
#on_block(node) ⇒ Object
34 35 36 37 38 |
# File 'lib/rubocop/cop/rspec/scattered_let.rb', line 34 def on_block(node) return unless example_group_with_body?(node) check_let_declarations(node.body) end |