lib/rubocop/cop/rspec/pending.rb in rubocop-rspec-1.25.0 vs lib/rubocop/cop/rspec/pending.rb in rubocop-rspec-1.25.1
- old
+ new
@@ -41,11 +41,15 @@
(send nil? #{SKIPPABLE_SELECTORS} $...)}
PATTERN
def_node_matcher :pending_block?, PENDING_EXAMPLES.send_pattern
+ def_node_matcher :rspec?, '(send {(const nil? :RSpec) nil?} ...)'
+
def on_send(node)
return unless pending_block?(node) || skipped_from_metadata?(node)
+ return unless rspec?(node)
+
add_offense(node, location: :expression)
end
private