thoughtbot / factory_bot_rails

Factory Bot ♥ Rails

Home Page:https://thoughtbot.com/services/ruby-on-rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing newline when generating factories in a single file

composerinteralia opened this issue · comments

rails generate model robot name:string

In an existing factories.rb:

FactoryBot.define do
  factory :robot do
    name { "MyString" }
  end
  factory :human do
    #...
  end
end

generates the factory at the top of the file without any space between the robot factory and an existing human factory. It would be better if there were a newline there:

FactoryBot.define do
  factory :robot do
    name { "MyString" }
  end

  factory :human do
    #...
  end
end