lib/rubocop/cop/rspec/no_expectation_example.rb in rubocop-rspec-2.13.1 vs lib/rubocop/cop/rspec/no_expectation_example.rb in rubocop-rspec-2.13.2

- old
+ new

@@ -47,13 +47,21 @@ def_node_search( :including_any_expectation?, send_pattern('#Expectations.all') ) + # @!method including_any_skip_example?(node) + # @param [RuboCop::AST::Node] node + # @return [Boolean] + def_node_search :including_any_skip_example?, <<~PATTERN + (send nil? {:pending :skip} ...) + PATTERN + # @param [RuboCop::AST::BlockNode] node def on_block(node) return unless regular_or_focused_example?(node) return if including_any_expectation?(node) + return if including_any_skip_example?(node) add_offense(node) end alias on_numblock on_block