Sha256: 487d95d2dfab1c58a6fcc4663f921c61adda7c46266b618b384f43045641da1e

Contents?: true

Size: 1.17 KB

Versions: 45

Compression:

Stored size: 1.17 KB

Contents

# frozen_string_literal: true

module RuboCop
  module RSpec
    # RuboCop FactoryBot project namespace
    module FactoryBot
      ATTRIBUTE_DEFINING_METHODS = %i[
        factory
        ignore
        trait
        traits_for_enum
        transient
      ].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

45 entries across 41 versions & 2 rubygems

Version Path
rubocop-rspec-2.13.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.12.1 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.12.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.11.1 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.11.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.10.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.9.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.8.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.7.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.6.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.5.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.4.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.3.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.2.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.1.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.0.1 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.0.0 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-2.0.0.pre lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.44.1 lib/rubocop/rspec/factory_bot.rb
rubocop-rspec-1.44.0 lib/rubocop/rspec/factory_bot.rb