Sha256: fd463504e015cdcd9276bd4600351e4b7f734daedf8363cfb54d267534b54704

Contents?: true

Size: 624 Bytes

Versions: 3

Compression:

Stored size: 624 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module RSpec
      # Helps check offenses with variable definitions
      module SkipOrPending
        extend RuboCop::NodePattern::Macros

        # @!method skipped_in_metadata?(node)
        def_node_matcher :skipped_in_metadata?, <<-PATTERN
          {
            (send _ _ <#skip_or_pending? ...>)
            (send _ _ ... (hash <(pair #skip_or_pending? { true str dstr }) ...>))
          }
        PATTERN

        # @!method skip_or_pending?(node)
        def_node_matcher :skip_or_pending?, '{(sym :skip) (sym :pending)}'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubocop-rspec-2.18.1 lib/rubocop/cop/rspec/mixin/skip_or_pending.rb
rubocop-rspec-2.18.0 lib/rubocop/cop/rspec/mixin/skip_or_pending.rb
rubocop-rspec-2.17.1 lib/rubocop/cop/rspec/mixin/skip_or_pending.rb