Sha256: b563fd2178a156f4abd19ee593aa80269904083f020bd9baa993069737b0866e
Contents?: true
Size: 809 Bytes
Versions: 14
Compression:
Stored size: 809 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module CUL # Do not commit specs that call `page.save_screenshot` class CapybaraScreenshots < RuboCop::Cop::Cop MSG = 'Remove debugging/instrumentation such as `page#save_screenshot` before committing.' # This cop uses a node matcher for matching node pattern. # See https://github.com/rubocop/rubocop-ast/blob/master/docs/modules/ROOT/pages/node_pattern.adoc # # For example def_node_matcher :called_forbidden_method?, <<-PATTERN (send (send nil? :page) :save_screenshot) PATTERN def on_send(node) return unless called_forbidden_method?(node) add_offense(node, location: :expression, message: MSG) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems