Class: RuboCop::Cop::PollEverywhere::RenderViews

Inherits:
RuboCop::Cop
  • Object
show all
Defined in:
lib/rubocop/cop/polleverywhere/render_views.rb

Constant Summary collapse

MSG =
'Do not use `render_views` in controller specs because it is orders of magnitude slower. If view rendering needs to be tested, write a different type of spec (acceptance, view, etc.)'.freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



13
14
15
16
17
# File 'lib/rubocop/cop/polleverywhere/render_views.rb', line 13

def on_send(node)
  return unless render_views?(node)

  add_offense(node, location: :selector)
end