Create three traits in FactoryBot to prevent deprecation warning

Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
This commit is contained in:
Sebastian Serth
2018-09-11 15:21:51 +02:00
parent ff24a0bf0b
commit 108190c242

View File

@ -190,8 +190,16 @@ FactoryBot.define do
singleton_file_type
end
[:binary, :executable, :renderable].each do |attribute|
trait(attribute) { send(attribute, true) }
trait :binary do
binary { true }
end
trait :executable do
executable { true }
end
trait :renderable do
renderable { true }
end
trait :singleton_file_type do