From 05e3abe9d90c32891d87283ffdccf6dddc4e0f9c Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 2 May 2023 15:06:51 -0400 Subject: [PATCH] Fix Lint/EmptyClass cop (#24795) --- .rubocop_todo.yml | 5 ----- spec/controllers/api/base_controller_spec.rb | 6 ++++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9c0f25848..4410802d0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -159,11 +159,6 @@ Lint/EmptyBlock: - 'spec/models/user_role_spec.rb' - 'spec/models/web/setting_spec.rb' -# Configuration parameters: AllowComments. -Lint/EmptyClass: - Exclude: - - 'spec/controllers/api/base_controller_spec.rb' - Lint/NonLocalExitFromIterator: Exclude: - 'app/helpers/jsonld_helper.rb' diff --git a/spec/controllers/api/base_controller_spec.rb b/spec/controllers/api/base_controller_spec.rb index 080eab3c0..dd90aead2 100644 --- a/spec/controllers/api/base_controller_spec.rb +++ b/spec/controllers/api/base_controller_spec.rb @@ -2,9 +2,11 @@ require 'rails_helper' -class FakeService; end - describe Api::BaseController do + before do + stub_const('FakeService', Class.new) + end + controller do def success head 200