Autofix Rubocop RSpec/EmptyLineAfterExample (#23661)

lolsob-rspec
Nick Schonning 2023-02-17 07:46:00 -05:00 committed by GitHub
parent 284a6902cc
commit a45f8ff02d
2 changed files with 2 additions and 7 deletions

View File

@ -1164,13 +1164,6 @@ RSpec/EmptyExampleGroup:
- 'spec/models/web/setting_spec.rb' - 'spec/models/web/setting_spec.rb'
- 'spec/services/unmute_service_spec.rb' - 'spec/services/unmute_service_spec.rb'
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowConsecutiveOneLiners.
RSpec/EmptyLineAfterExample:
Exclude:
- 'spec/services/search_service_spec.rb'
# Offense count: 25 # Offense count: 25
# This cop supports safe autocorrection (--autocorrect). # This cop supports safe autocorrection (--autocorrect).
RSpec/EmptyLineAfterFinalLet: RSpec/EmptyLineAfterFinalLet:

View File

@ -83,6 +83,7 @@ describe SearchService, type: :service do
expect(Tag).to have_received(:search_for).with('tag', 10, 0, exclude_unreviewed: nil) expect(Tag).to have_received(:search_for).with('tag', 10, 0, exclude_unreviewed: nil)
expect(results).to eq empty_results.merge(hashtags: [tag]) expect(results).to eq empty_results.merge(hashtags: [tag])
end end
it 'does not include tag when starts with @ character' do it 'does not include tag when starts with @ character' do
query = '@username' query = '@username'
allow(Tag).to receive(:search_for) allow(Tag).to receive(:search_for)
@ -91,6 +92,7 @@ describe SearchService, type: :service do
expect(Tag).not_to have_received(:search_for) expect(Tag).not_to have_received(:search_for)
expect(results).to eq empty_results expect(results).to eq empty_results
end end
it 'does not include account when starts with # character' do it 'does not include account when starts with # character' do
query = '#tag' query = '#tag'
allow(AccountSearchService).to receive(:new) allow(AccountSearchService).to receive(:new)