Sha256: 14b26e3e83b4cfb3e18c23123aaae9de78ff70ab5f9e73e0da3f90a492309bff

Contents?: true

Size: 791 Bytes

Versions: 60

Compression:

Stored size: 791 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module RSpec
      # @abstract parent class to RSpec cops
      class Base < ::RuboCop::Cop::Base
        include RuboCop::RSpec::Language
        extend RuboCop::RSpec::Language::NodePattern

        exclude_from_registry

        # Invoke the original inherited hook so our cops are recognized
        def self.inherited(subclass) # rubocop:disable Lint/MissingSuper
          RuboCop::Cop::Base.inherited(subclass)
        end

        # Set the config for dynamic DSL configuration-aware helpers
        # that have no other means of accessing the configuration.
        def on_new_investigation
          super
          RuboCop::RSpec::Language.config = config['RSpec']['Language']
        end
      end
    end
  end
end

Version data entries

60 entries across 54 versions & 4 rubygems

Version Path
rubocop-rspec-2.14.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.13.2 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.13.1 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.13.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.12.1 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.12.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.11.1 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.11.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.10.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.9.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.8.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.7.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.6.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.5.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.4.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.3.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.2.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.1.0 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.0.1 lib/rubocop/cop/rspec/base.rb
rubocop-rspec-2.0.0 lib/rubocop/cop/rspec/base.rb