The issue was a rubocop control comment recently added in test/factories.rb
:
FactoryBot.define do # rubocop:disable Metrics/BlockLength
Removing the comment lets the generator match FactoryBot.define correctly again. Wrapping the define statement in rubocop control comments on different lines works as a short term solution until we split our many factories out into different files:
# rubocop:disable Metrics/BlockLength
FactoryBot.define do
# rubocop:enable Metrics/BlockLength