Class: RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb

Overview

Checks for name style for argument of FactoryBot::Syntax::Methods.

Examples:

EnforcedStyle: symbol (default)

# bad
create('user')
build "user", username: "NAME"

# good
create(:user)
build :user, username: "NAME"

EnforcedStyle: string

# bad
create(:user)
build :user, username: "NAME"

# good
create('user')
build "user", username: "NAME"