* Enable Rails cops * Fix Rails/DynamicFindBy * Fix Rails/HttpStatus * Fix Rails/Blank * Fix Rails/RequestReferer * Fix Rails/ActiveRecordAliases * Fix Rails/FindBy * Fix Rails/Presence * Fix Rails/Delegate * Fix Rails/Validation * Fix Rails/PluralizationGrammar * Fix Rails/Present * Fix Rails/Output * Fix Rails/Blank * Fix Rails/FilePath * Fix Rails/InverseOf * Fix Rails/LexicallyScopedActionFilter * Add Rails/OutputSafety to TODO * Add Rails/HasManyOrHasOneDependent to TODO * Add Rails/SkipsModelValidations to TODO
12 lines
303 B
Ruby
12 lines
303 B
Ruby
FactoryBot.define do
|
|
image = Rack::Test::UploadedFile.new(
|
|
Rails.root.join("spec", "support", "fixtures", "images", "image1.jpeg"),
|
|
"image/jpeg",
|
|
)
|
|
|
|
factory :badge do
|
|
title { Faker::Games::Overwatch.quote }
|
|
description { Faker::Lorem.sentence }
|
|
badge_image { image }
|
|
end
|
|
end
|