Installazione FactoryBot

Crea il file spec/plugins/factory_bot.rb e aggiungilo al file rails_helper.rb

require 'plugins/factory_bot'

Nello stesso file aggiungere le config dentro al blocco RSpec

RSpec.configure do |config|
  config.include FactoryBot::Syntax::Methods
end

Last updated

Was this helpful?