Class: RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods

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

Overview

Use shorthands from ‘FactoryBot::Syntax::Methods` in your specs.

Examples:

# bad
FactoryBot.create(:bar)
FactoryBot.build(:bar)
FactoryBot.attributes_for(:bar)

# good
create(:bar)
build(:bar)
attributes_for(:bar)