Module: RuboCop::Cop::RSpec::SkipOrPending
- Extended by:
- NodePattern::Macros
- Included in:
- NoExpectationExample, Pending, RepeatedExampleGroupBody, RepeatedExampleGroupDescription
- Defined in:
- lib/rubocop/cop/rspec/mixin/skip_or_pending.rb
Overview
Helps check offenses with variable definitions
Instance Method Summary collapse
-
#skip_or_pending_inside_block?(node) ⇒ Array<RuboCop::AST::Node>
Match skip/pending statements inside a block (e.g. ‘context`).
- #skipped_in_metadata?(node) ⇒ Object
Instance Method Details
#skip_or_pending_inside_block?(node) ⇒ Array<RuboCop::AST::Node>
Match skip/pending statements inside a block (e.g. ‘context`)
33 34 35 |
# File 'lib/rubocop/cop/rspec/mixin/skip_or_pending.rb', line 33 def_node_matcher :skip_or_pending_inside_block?, <<~PATTERN (block <(send nil? {:skip :pending} ...) ...>) PATTERN |
#skipped_in_metadata?(node) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/rubocop/cop/rspec/mixin/skip_or_pending.rb', line 11 def_node_matcher :skipped_in_metadata?, <<~PATTERN { (send _ _ <(sym {:skip :pending}) ...>) (send _ _ ... (hash <(pair (sym {:skip :pending}) { true str dstr }) ...>)) } PATTERN |