Sha256: 3d9e7edac29641ecd59cb9dfdc7a4dd88198874c0044e5a5b3b391bb813a3b6c

Contents?: true

Size: 930 Bytes

Versions: 23

Compression:

Stored size: 930 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module RSpec
      module FactoryBot
        # @!parse
        #   # Checks for name style for argument of FactoryBot::Syntax::Methods.
        #   #
        #   # @example EnforcedStyle: symbol (default)
        #   #   # bad
        #   #   create('user')
        #   #   build "user", username: "NAME"
        #   #
        #   #   # good
        #   #   create(:user)
        #   #   build :user, username: "NAME"
        #   #
        #   # @example EnforcedStyle: string
        #   #   # bad
        #   #   create(:user)
        #   #   build :user, username: "NAME"
        #   #
        #   #   # good
        #   #   create('user')
        #   #   build "user", username: "NAME"
        #   #
        #   class FactoryNameStyle < ::RuboCop::Cop::Base; end
        FactoryNameStyle = ::RuboCop::Cop::FactoryBot::FactoryNameStyle
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 4 rubygems

Version Path
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rubocop-rspec-2.22.0/lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb
fablicop-1.10.2 vendor/bundle/ruby/3.2.0/gems/rubocop-rspec-2.22.0/lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb
rubocop-rspec-2.22.0 lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb