Update rubocop-rspec to version 3.6.0 (#34497)

This commit is contained in:
Matt Jankowski 2025-04-24 10:56:13 -04:00 committed by GitHub
parent 22ec828951
commit 6463415e06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 223 additions and 228 deletions

View file

@ -35,7 +35,7 @@ RSpec.describe NotificationMailer do
let(:notification) { Notification.create!(account: receiver.account, activity: mention) }
let(:mail) { prepared_mailer_for(receiver.account).mention }
include_examples 'localized subject', 'notification_mailer.mention.subject', name: 'bob'
it_behaves_like 'localized subject', 'notification_mailer.mention.subject', name: 'bob'
it 'renders the email' do
expect(mail)
@ -47,8 +47,8 @@ RSpec.describe NotificationMailer do
.and have_standard_headers('mention').for(receiver)
end
include_examples 'delivery to non functional user'
include_examples 'delivery without status'
it_behaves_like 'delivery to non functional user'
it_behaves_like 'delivery without status'
end
describe 'follow' do
@ -56,7 +56,7 @@ RSpec.describe NotificationMailer do
let(:notification) { Notification.create!(account: receiver.account, activity: follow) }
let(:mail) { prepared_mailer_for(receiver.account).follow }
include_examples 'localized subject', 'notification_mailer.follow.subject', name: 'bob'
it_behaves_like 'localized subject', 'notification_mailer.follow.subject', name: 'bob'
it 'renders the email' do
expect(mail)
@ -66,7 +66,7 @@ RSpec.describe NotificationMailer do
.and have_standard_headers('follow').for(receiver)
end
include_examples 'delivery to non functional user'
it_behaves_like 'delivery to non functional user'
end
describe 'favourite' do
@ -74,7 +74,7 @@ RSpec.describe NotificationMailer do
let(:notification) { Notification.create!(account: receiver.account, activity: favourite) }
let(:mail) { prepared_mailer_for(own_status.account).favourite }
include_examples 'localized subject', 'notification_mailer.favourite.subject', name: 'bob'
it_behaves_like 'localized subject', 'notification_mailer.favourite.subject', name: 'bob'
it 'renders the email' do
expect(mail)
@ -86,8 +86,8 @@ RSpec.describe NotificationMailer do
.and have_standard_headers('favourite').for(receiver)
end
include_examples 'delivery to non functional user'
include_examples 'delivery without status'
it_behaves_like 'delivery to non functional user'
it_behaves_like 'delivery without status'
end
describe 'reblog' do
@ -95,7 +95,7 @@ RSpec.describe NotificationMailer do
let(:notification) { Notification.create!(account: receiver.account, activity: reblog) }
let(:mail) { prepared_mailer_for(own_status.account).reblog }
include_examples 'localized subject', 'notification_mailer.reblog.subject', name: 'bob'
it_behaves_like 'localized subject', 'notification_mailer.reblog.subject', name: 'bob'
it 'renders the email' do
expect(mail)
@ -107,8 +107,8 @@ RSpec.describe NotificationMailer do
.and have_standard_headers('reblog').for(receiver)
end
include_examples 'delivery to non functional user'
include_examples 'delivery without status'
it_behaves_like 'delivery to non functional user'
it_behaves_like 'delivery without status'
end
describe 'follow_request' do
@ -116,7 +116,7 @@ RSpec.describe NotificationMailer do
let(:notification) { Notification.create!(account: receiver.account, activity: follow_request) }
let(:mail) { prepared_mailer_for(receiver.account).follow_request }
include_examples 'localized subject', 'notification_mailer.follow_request.subject', name: 'bob'
it_behaves_like 'localized subject', 'notification_mailer.follow_request.subject', name: 'bob'
it 'renders the email' do
expect(mail)
@ -126,7 +126,7 @@ RSpec.describe NotificationMailer do
.and have_standard_headers('follow_request').for(receiver)
end
include_examples 'delivery to non functional user'
it_behaves_like 'delivery to non functional user'
end
private

View file

@ -29,10 +29,10 @@ RSpec.describe UserMailer do
.and(have_body_text(Rails.configuration.x.local_domain))
end
include_examples 'localized subject',
'devise.mailer.confirmation_instructions.subject',
instance: Rails.configuration.x.local_domain
include_examples 'delivery to memorialized user'
it_behaves_like 'localized subject',
'devise.mailer.confirmation_instructions.subject',
instance: Rails.configuration.x.local_domain
it_behaves_like 'delivery to memorialized user'
end
describe '#reconfirmation_instructions' do
@ -48,10 +48,10 @@ RSpec.describe UserMailer do
.and(have_body_text(Rails.configuration.x.local_domain))
end
include_examples 'localized subject',
'devise.mailer.confirmation_instructions.subject',
instance: Rails.configuration.x.local_domain
include_examples 'delivery to memorialized user'
it_behaves_like 'localized subject',
'devise.mailer.confirmation_instructions.subject',
instance: Rails.configuration.x.local_domain
it_behaves_like 'delivery to memorialized user'
end
describe '#reset_password_instructions' do
@ -66,9 +66,9 @@ RSpec.describe UserMailer do
.and(have_body_text('spec'))
end
include_examples 'localized subject',
'devise.mailer.reset_password_instructions.subject'
include_examples 'delivery to memorialized user'
it_behaves_like 'localized subject',
'devise.mailer.reset_password_instructions.subject'
it_behaves_like 'delivery to memorialized user'
end
describe '#password_change' do
@ -82,9 +82,9 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('devise.mailer.password_change.title')))
end
include_examples 'localized subject',
'devise.mailer.password_change.subject'
include_examples 'delivery to memorialized user'
it_behaves_like 'localized subject',
'devise.mailer.password_change.subject'
it_behaves_like 'delivery to memorialized user'
end
describe '#email_changed' do
@ -98,9 +98,9 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('devise.mailer.email_changed.title')))
end
include_examples 'localized subject',
'devise.mailer.email_changed.subject'
include_examples 'delivery to memorialized user'
it_behaves_like 'localized subject',
'devise.mailer.email_changed.subject'
it_behaves_like 'delivery to memorialized user'
end
describe '#warning' do
@ -129,9 +129,9 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('devise.mailer.webauthn_credential.deleted.title')))
end
include_examples 'localized subject',
'devise.mailer.webauthn_credential.deleted.subject'
include_examples 'delivery to memorialized user'
it_behaves_like 'localized subject',
'devise.mailer.webauthn_credential.deleted.subject'
it_behaves_like 'delivery to memorialized user'
end
describe '#suspicious_sign_in' do
@ -148,8 +148,8 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('user_mailer.suspicious_sign_in.explanation')))
end
include_examples 'localized subject',
'user_mailer.suspicious_sign_in.subject'
it_behaves_like 'localized subject',
'user_mailer.suspicious_sign_in.subject'
end
describe '#failed_2fa' do
@ -166,8 +166,8 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('user_mailer.failed_2fa.explanation')))
end
include_examples 'localized subject',
'user_mailer.failed_2fa.subject'
it_behaves_like 'localized subject',
'user_mailer.failed_2fa.subject'
end
describe '#appeal_approved' do
@ -204,7 +204,7 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('devise.mailer.two_factor_enabled.explanation')))
end
include_examples 'delivery to memorialized user'
it_behaves_like 'delivery to memorialized user'
end
describe '#two_factor_disabled' do
@ -217,7 +217,7 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('devise.mailer.two_factor_disabled.explanation')))
end
include_examples 'delivery to memorialized user'
it_behaves_like 'delivery to memorialized user'
end
describe '#webauthn_enabled' do
@ -230,7 +230,7 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('devise.mailer.webauthn_enabled.explanation')))
end
include_examples 'delivery to memorialized user'
it_behaves_like 'delivery to memorialized user'
end
describe '#webauthn_disabled' do
@ -243,7 +243,7 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('devise.mailer.webauthn_disabled.explanation')))
end
include_examples 'delivery to memorialized user'
it_behaves_like 'delivery to memorialized user'
end
describe '#two_factor_recovery_codes_changed' do
@ -256,7 +256,7 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('devise.mailer.two_factor_recovery_codes_changed.explanation')))
end
include_examples 'delivery to memorialized user'
it_behaves_like 'delivery to memorialized user'
end
describe '#webauthn_credential_added' do
@ -270,7 +270,7 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('devise.mailer.webauthn_credential.added.explanation')))
end
include_examples 'delivery to memorialized user'
it_behaves_like 'delivery to memorialized user'
end
describe '#welcome' do
@ -289,7 +289,7 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('user_mailer.welcome.explanation')))
end
include_examples 'delivery to memorialized user'
it_behaves_like 'delivery to memorialized user'
end
describe '#backup_ready' do
@ -303,7 +303,7 @@ RSpec.describe UserMailer do
.and(have_body_text(I18n.t('user_mailer.backup_ready.explanation')))
end
include_examples 'delivery to memorialized user'
it_behaves_like 'delivery to memorialized user'
end
describe '#terms_of_service_changed' do