From 881b357c77fa8abed41deecd4b3ac1d06ec274b6 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Thu, 13 Sep 2018 16:35:24 +0900 Subject: [PATCH] Suppress FactoryBot warnings See also https://robots.thoughtbot.com/deprecating-static-attributes-in-factory_bot-4-11 Signed-off-by: Kenji Okimoto --- test/factories/fluentd.rb | 8 ++++---- test/factories/plugins.rb | 4 ++-- test/factories/user.rb | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/factories/fluentd.rb b/test/factories/fluentd.rb index aff33b9..1b313df 100644 --- a/test/factories/fluentd.rb +++ b/test/factories/fluentd.rb @@ -3,9 +3,9 @@ FactoryBot.define do dir = Rails.root.join("tmp/fluentd-test").to_s FileUtils.mkdir_p(dir) - variant "fluentd_gem" - log_file dir + "/fluentd.log" - pid_file dir + "/fluentd.pid" - config_file dir + "/fluentd.conf" + variant { "fluentd_gem" } + log_file { dir + "/fluentd.log" } + pid_file { dir + "/fluentd.pid" } + config_file { dir + "/fluentd.conf" } end end diff --git a/test/factories/plugins.rb b/test/factories/plugins.rb index 010699b..74983ba 100644 --- a/test/factories/plugins.rb +++ b/test/factories/plugins.rb @@ -2,7 +2,7 @@ FactoryBot.define do factory :plugin do - gem_name "fluent-plugin-dummy" - version "1.2.3" + gem_name { "fluent-plugin-dummy" } + version { "1.2.3" } end end diff --git a/test/factories/user.rb b/test/factories/user.rb index e5f5e63..41050af 100644 --- a/test/factories/user.rb +++ b/test/factories/user.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :user do - name "admin" - password "changeme" + name { "admin" } + password { "changeme" } end end