Sha256: 4ceb09862c177347ac605f9a2605aa559158f6ef835b7f25318b8a3cd0901706

Contents?: true

Size: 1.11 KB

Versions: 11

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

module RuboCop
  module RSpec
    # RuboCop FactoryBot project namespace
    module FactoryBot
      ATTRIBUTE_DEFINING_METHODS = %i[factory trait transient ignore].freeze

      UNPROXIED_METHODS = %i[
        __send__
        __id__
        nil?
        send
        object_id
        extend
        instance_eval
        initialize
        block_given?
        raise
        caller
        method
      ].freeze

      DEFINITION_PROXY_METHODS = %i[
        add_attribute
        after
        association
        before
        callback
        ignore
        initialize_with
        sequence
        skip_create
        to_create
      ].freeze

      RESERVED_METHODS =
        DEFINITION_PROXY_METHODS +
        UNPROXIED_METHODS +
        ATTRIBUTE_DEFINING_METHODS

      private_constant(
        :ATTRIBUTE_DEFINING_METHODS,
        :UNPROXIED_METHODS,
        :DEFINITION_PROXY_METHODS,
        :RESERVED_METHODS
      )

      def self.attribute_defining_methods
        ATTRIBUTE_DEFINING_METHODS
      end

      def self.reserved_methods
        RESERVED_METHODS
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rubocop-rspec-1.40.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.39.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.38.1 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.38.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.37.1 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.37.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.36.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.35.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.34.1 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.34.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.33.0 lib/rubocop/rspec/factory_bot.rb