Sha256: aead19a1e0474e822d0d933ad4da957df4bcc84ce2f01fbdf7b93baba635236f

Contents?: true

Size: 752 Bytes

Versions: 14

Compression:

Stored size: 752 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module FactoryBot
    # Contains node matchers for common factory_bot DSL.
    module Language
      extend RuboCop::NodePattern::Macros

      METHODS = %i[
        attributes_for
        attributes_for_list
        attributes_for_pair
        build
        build_list
        build_pair
        build_stubbed
        build_stubbed_list
        build_stubbed_pair
        create
        create_list
        create_pair
        generate
        generate_list
        null
        null_list
        null_pair
      ].to_set.freeze

      # @!method factory_bot?(node)
      def_node_matcher :factory_bot?, <<~PATTERN
        (const {nil? cbase} {:FactoryGirl :FactoryBot})
      PATTERN
    end
  end
end

Version data entries

14 entries across 14 versions & 5 rubygems

Version Path
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/rubocop-factory_bot-2.26.1/lib/rubocop/factory_bot/language.rb
rubocop-factory_bot-2.26.1 lib/rubocop/factory_bot/language.rb
rubocop-factory_bot-2.26.0 lib/rubocop/factory_bot/language.rb
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/rubocop-factory_bot-2.25.1/lib/rubocop/factory_bot/language.rb
rubocop-factory_bot-2.25.1 lib/rubocop/factory_bot/language.rb
rubocop-factory_bot-2.25.0 lib/rubocop/factory_bot/language.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/language.rb
rubocop-factory_bot-2.24.0 lib/rubocop/factory_bot/language.rb
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/language.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/language.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/language.rb
fablicop-1.10.2 vendor/bundle/ruby/3.2.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/language.rb
rubocop-factory_bot-2.23.1 lib/rubocop/factory_bot/language.rb
rubocop-factory_bot-2.23.0 lib/rubocop/factory_bot/language.rb