lib/rubocop/cop/rspec/focus.rb in rubocop-rspec-2.2.0 vs lib/rubocop/cop/rspec/focus.rb in rubocop-rspec-2.3.0
- old
+ new
@@ -23,24 +23,27 @@
extend AutoCorrector
include RangeHelp
MSG = 'Focused spec found.'
+ # @!method focusable_selector?(node)
def_node_matcher :focusable_selector?, <<-PATTERN
{
#ExampleGroups.regular
#ExampleGroups.skipped
#Examples.regular
#Examples.skipped
#Examples.pending
}
PATTERN
+ # @!method metadata(node)
def_node_matcher :metadata, <<-PATTERN
{(send #rspec? #focusable_selector? <$(sym :focus) ...>)
(send #rspec? #focusable_selector? ... (hash <$(pair (sym :focus) true) ...>))}
PATTERN
+ # @!method focused_block?(node)
def_node_matcher :focused_block?,
send_pattern(<<~PATTERN)
{#ExampleGroups.focused #Examples.focused}
PATTERN