lib/rubocop/cop/rspec/no_expectation_example.rb in rubocop-rspec-2.18.1 vs lib/rubocop/cop/rspec/no_expectation_example.rb in rubocop-rspec-2.19.0
- old
+ new
@@ -63,21 +63,18 @@
# @!method regular_or_focused_example?(node)
# @param [RuboCop::AST::Node] node
# @return [Boolean]
def_node_matcher :regular_or_focused_example?, <<~PATTERN
- {
- #{block_pattern('{#Examples.regular | #Examples.focused}')}
- #{numblock_pattern('{#Examples.regular | #Examples.focused}')}
- }
+ ({block numblock} (send nil? {#Examples.regular #Examples.focused} ...) ...)
PATTERN
# @!method includes_expectation?(node)
# @param [RuboCop::AST::Node] node
# @return [Boolean]
def_node_search :includes_expectation?, <<~PATTERN
{
- #{send_pattern('#Expectations.all')}
+ (send nil? #Expectations.all ...)
(send nil? `#matches_allowed_pattern? ...)
}
PATTERN
# @!method includes_skip_example?(node)