1
0
Fork 1
mirror of https://github.com/mastodon/mastodon.git synced 2024-12-26 10:36:34 +00:00

Fix Lint/EmptyBlock cop ()

This commit is contained in:
Matt Jankowski 2023-11-07 04:11:04 -05:00 committed by GitHub
parent b06284c572
commit cfa14ec6d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 6 additions and 19 deletions

View file

@ -20,16 +20,6 @@ Layout/LineLength:
Exclude: Exclude:
- 'app/models/account.rb' - 'app/models/account.rb'
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/controllers/api/v2/search_controller_spec.rb'
- 'spec/fabricators/access_token_fabricator.rb'
- 'spec/fabricators/conversation_fabricator.rb'
- 'spec/fabricators/system_key_fabricator.rb'
- 'spec/lib/activitypub/adapter_spec.rb'
- 'spec/models/user_role_spec.rb'
Lint/NonLocalExitFromIterator: Lint/NonLocalExitFromIterator:
Exclude: Exclude:
- 'app/helpers/jsonld_helper.rb' - 'app/helpers/jsonld_helper.rb'

View file

@ -53,7 +53,7 @@ RSpec.describe Api::V2::SearchController do
context 'without token' do context 'without token' do
describe 'GET #index' do describe 'GET #index' do
let(:search_params) {} let(:search_params) { nil }
before do before do
get :index, params: search_params get :index, params: search_params

View file

@ -1,4 +1,3 @@
# frozen_string_literal: true # frozen_string_literal: true
Fabricator :access_token, from: 'Doorkeeper::AccessToken' do Fabricator :access_token, from: 'Doorkeeper::AccessToken'
end

View file

@ -1,4 +1,3 @@
# frozen_string_literal: true # frozen_string_literal: true
Fabricator(:conversation) do Fabricator(:conversation)
end

View file

@ -1,4 +1,3 @@
# frozen_string_literal: true # frozen_string_literal: true
Fabricator(:system_key) do Fabricator(:system_key)
end

View file

@ -53,7 +53,7 @@ RSpec.describe ActivityPub::Adapter do
describe '#serializable_hash' do describe '#serializable_hash' do
subject { ActiveModelSerializers::SerializableResource.new(TestObject.new(foo: 'bar'), serializer: serializer_class, adapter: described_class).as_json } subject { ActiveModelSerializers::SerializableResource.new(TestObject.new(foo: 'bar'), serializer: serializer_class, adapter: described_class).as_json }
let(:serializer_class) {} let(:serializer_class) { nil }
context 'when serializer defines no context' do context 'when serializer defines no context' do
let(:serializer_class) { TestWithBasicContextSerializer } let(:serializer_class) { TestWithBasicContextSerializer }

View file

@ -60,7 +60,7 @@ RSpec.describe UserRole do
end end
describe '#permissions_as_keys=' do describe '#permissions_as_keys=' do
let(:input) {} let(:input) { nil }
before do before do
subject.permissions_as_keys = input subject.permissions_as_keys = input