From 48c63cb536da050dcccbf21502ce46db353cb233 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 16:00:20 +0000 Subject: [PATCH 1/3] Update rubocop-factory_bot to version 2.23.1 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f4c115e3..28a7f790 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -313,7 +313,7 @@ GEM parser (>= 3.2.1.0) rubocop-capybara (2.18.0) rubocop (~> 1.41) - rubocop-factory_bot (2.22.0) + rubocop-factory_bot (2.23.1) rubocop (~> 1.33) rubocop-rails (2.19.1) activesupport (>= 4.2.0) From f8a0ba0f1c25680cf1cd311d798a994892dd40e8 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Fri, 11 Aug 2023 16:14:34 +0200 Subject: [PATCH 2/3] Fix FactoryBot/AssociationStyle lints --- spec/factories/comments.rb | 4 ++-- spec/factories/notifications.rb | 4 ++-- spec/factories/projects.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/factories/comments.rb b/spec/factories/comments.rb index 4261ff11..7b4f2126 100644 --- a/spec/factories/comments.rb +++ b/spec/factories/comments.rb @@ -1,7 +1,7 @@ FactoryBot.define do factory :comment do - association :commenter, factory: :user - association :commentable, factory: :project + commenter factory: %i[user] + commentable factory: %i[project] text { 'Sample' } diff --git a/spec/factories/notifications.rb b/spec/factories/notifications.rb index df483e54..61001e79 100644 --- a/spec/factories/notifications.rb +++ b/spec/factories/notifications.rb @@ -3,7 +3,7 @@ read_at { nil } recipient_id { 1 } action { 'string' } - association :actor, factory: :user - association :notifiable, factory: :project + actor factory: %i[user] + notifiable factory: %i[project] end end diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 8d3e83cf..a743b27d 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -7,7 +7,7 @@ likes_count { 0 } memberships_count { 0 } aasm_state { 'idea' } - association :originator, factory: :user + originator factory: %i[user] factory :idea, class: Project do aasm_state { 'idea' } From 5c2c91bfb76631135bb4b7385201b50d7e4c8def Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Fri, 11 Aug 2023 16:14:59 +0200 Subject: [PATCH 3/3] Enable all installed rubocop extensions --- .rubocop.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index c5489715..9ebef319 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,6 +2,8 @@ inherit_from: .rubocop_todo.yml require: - rubocop-rails - rubocop-rspec + - rubocop-capybara + - rubocop-factory_bot AllCops: NewCops: enable