lib/rubocop/cop/rspec/pending.rb in rubocop-rspec-2.18.1 vs lib/rubocop/cop/rspec/pending.rb in rubocop-rspec-2.19.0
- old
+ new
@@ -36,23 +36,23 @@
include SkipOrPending
MSG = 'Pending spec found.'
# @!method skippable?(node)
- def_node_matcher :skippable?,
- send_pattern(<<~PATTERN)
- {#ExampleGroups.regular #Examples.regular}
- PATTERN
+ def_node_matcher :skippable?, <<~PATTERN
+ {
+ (send #rspec? #ExampleGroups.regular ...)
+ (send nil? #Examples.regular ...)
+ }
+ PATTERN
# @!method pending_block?(node)
- def_node_matcher :pending_block?,
- send_pattern(<<~PATTERN)
- {
- #ExampleGroups.skipped
- #Examples.skipped
- #Examples.pending
- }
- PATTERN
+ def_node_matcher :pending_block?, <<~PATTERN
+ {
+ (send #rspec? #ExampleGroups.skipped ...)
+ (send nil? {#Examples.skipped #Examples.pending} ...)
+ }
+ PATTERN
def on_send(node)
return unless pending_block?(node) || skipped?(node)
add_offense(node)