From 108190c242ceb724581b93ace43256990d20143d Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 11 Sep 2018 15:21:51 +0200 Subject: [PATCH] Create three traits in FactoryBot to prevent deprecation warning Signed-off-by: Sebastian Serth --- spec/factories/file_type.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/spec/factories/file_type.rb b/spec/factories/file_type.rb index 8d9082a7..07ee81bd 100644 --- a/spec/factories/file_type.rb +++ b/spec/factories/file_type.rb @@ -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