Class: RuboCop::Cop::CUL::CapybaraScreenshots
- Inherits:
-
RuboCop::Cop::Cop
- Object
- RuboCop::Cop::Cop
- RuboCop::Cop::CUL::CapybaraScreenshots
- Defined in:
- lib/rubocop/cop/cul/capybara_screenshots.rb
Overview
Do not commit specs that call ‘page.save_screenshot`
Constant Summary collapse
- MSG =
'Remove debugging/instrumentation such as `page#save_screenshot` before committing.'
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
17 18 19 20 |
# File 'lib/rubocop/cop/cul/capybara_screenshots.rb', line 17 def on_send(node) return unless called_forbidden_method?(node) add_offense(node, location: :expression, message: MSG) end |