It seems to be stemming from this interesting block of code in our spec/support/factory_bot.rb
# frozen_string_literal: true
RSpec.configure do |config|
config.include FactoryBot::Syntax::Methods
config.before(:suite) do
FactoryBot.definition_file_paths = [Rails.root.join('spec', 'factories')]
FactoryBot.find_definitions
begin
# FactoryBot::DatabaseCleaner.start
# FactoryBot.lint
ensure
# FactoryBot::DatabaseCleaner.clean
end
end
end
Yay legacy codebases.
This seems like it is arguably valid ruby, so perhaps shouldn't cause an error? I looked to see if I could try and fix it, but I couldn't quite figure out how - happy to help out with a solution with some pointers.
Hi,
I was using Ruby Critic the other day which calls
flog
which callsruby_parser
and noticed this error.It seems to be stemming from this interesting block of code in our
spec/support/factory_bot.rb
Yay legacy codebases.
This seems like it is arguably valid ruby, so perhaps shouldn't cause an error? I looked to see if I could try and fix it, but I couldn't quite figure out how - happy to help out with a solution with some pointers.
Tom