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.'
Constants inherited from Cop
Cop::DEFAULT_CONFIGURATION, Cop::DEFAULT_PATTERN_RE
Constants included from RSpec::Language
RSpec::Language::ALL, RSpec::Language::RSPEC
Instance Method Summary collapse
Methods inherited from Cop
Instance Method Details
#on_block(node) ⇒ Object
32 33 34 35 36 |
# File 'lib/rubocop/cop/rspec/scattered_let.rb', line 32 def on_block(node) return unless example_group_with_body?(node) check_let_declarations(node.body) end |