Sha256: b8bd51bf372689e083594eed25226cd35f96028f38c20aeef23f3974ab7ba595

Contents?: true

Size: 874 Bytes

Versions: 23

Compression:

Stored size: 874 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module RSpec
      module FactoryBot
        # @!parse
        #   # Always declare attribute values as blocks.
        #   #
        #   # @example
        #   #   # bad
        #   #   kind [:active, :rejected].sample
        #   #
        #   #   # good
        #   #   kind { [:active, :rejected].sample }
        #   #
        #   #   # bad
        #   #   closed_at 1.day.from_now
        #   #
        #   #   # good
        #   #   closed_at { 1.day.from_now }
        #   #
        #   #   # bad
        #   #   count 1
        #   #
        #   #   # good
        #   #   count { 1 }
        #   #
        #   class AttributeDefinedStatically < ::RuboCop::Cop::Base; end
        AttributeDefinedStatically =
          ::RuboCop::Cop::FactoryBot::AttributeDefinedStatically
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 4 rubygems

Version Path
rubocop-rspec-2.31.0 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.30.0 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.29.2 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.29.1 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.29.0 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.28.0 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.27.1 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.27.0 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/rubocop-rspec-2.26.1/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.26.1 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.26.0 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rubocop-rspec-2.22.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.25.0 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.24.1 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.24.0 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.23.2 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.23.1 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
rubocop-rspec-2.23.0 lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/rubocop-rspec-2.22.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/rubocop-rspec-2.22.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb