diff --git a/spec/chewy/accounts_index_spec.rb b/spec/chewy/accounts_index_spec.rb index f9c5922c76..f7b5b2e249 100644 --- a/spec/chewy/accounts_index_spec.rb +++ b/spec/chewy/accounts_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountsIndex do +RSpec.describe AccountsIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/chewy/public_statuses_index_spec.rb b/spec/chewy/public_statuses_index_spec.rb index 2f93d0ff02..6bc08832f3 100644 --- a/spec/chewy/public_statuses_index_spec.rb +++ b/spec/chewy/public_statuses_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublicStatusesIndex do +RSpec.describe PublicStatusesIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/chewy/statuses_index_spec.rb b/spec/chewy/statuses_index_spec.rb index 768e9415fc..e3899f3a17 100644 --- a/spec/chewy/statuses_index_spec.rb +++ b/spec/chewy/statuses_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusesIndex do +RSpec.describe StatusesIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/chewy/tags_index_spec.rb b/spec/chewy/tags_index_spec.rb index 054589bdfb..6b57da65e4 100644 --- a/spec/chewy/tags_index_spec.rb +++ b/spec/chewy/tags_index_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe TagsIndex do +RSpec.describe TagsIndex do describe 'Searching the index' do before do mock_elasticsearch_response(described_class, raw_response) diff --git a/spec/config/initializers/rack/attack_spec.rb b/spec/config/initializers/rack/attack_spec.rb index 19de480898..c7af11bea7 100644 --- a/spec/config/initializers/rack/attack_spec.rb +++ b/spec/config/initializers/rack/attack_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Rack::Attack, type: :request do +RSpec.describe Rack::Attack, type: :request do def app Rails.application end diff --git a/spec/controllers/activitypub/claims_controller_spec.rb b/spec/controllers/activitypub/claims_controller_spec.rb index f00eeb732a..e887be2cbe 100644 --- a/spec/controllers/activitypub/claims_controller_spec.rb +++ b/spec/controllers/activitypub/claims_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::ClaimsController do +RSpec.describe ActivityPub::ClaimsController do let(:account) { Fabricate(:account) } describe 'POST #create' do diff --git a/spec/controllers/admin/account_actions_controller_spec.rb b/spec/controllers/admin/account_actions_controller_spec.rb index b8dae79939..d513b3d4a0 100644 --- a/spec/controllers/admin/account_actions_controller_spec.rb +++ b/spec/controllers/admin/account_actions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::AccountActionsController do +RSpec.describe Admin::AccountActionsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/action_logs_controller_spec.rb b/spec/controllers/admin/action_logs_controller_spec.rb index be4222df08..3daf260672 100644 --- a/spec/controllers/admin/action_logs_controller_spec.rb +++ b/spec/controllers/admin/action_logs_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::ActionLogsController do +RSpec.describe Admin::ActionLogsController do render_views # Action logs typically cause issues when their targets are not in the database diff --git a/spec/controllers/admin/base_controller_spec.rb b/spec/controllers/admin/base_controller_spec.rb index 1f1fa8441a..8b8b7fe63d 100644 --- a/spec/controllers/admin/base_controller_spec.rb +++ b/spec/controllers/admin/base_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::BaseController do +RSpec.describe Admin::BaseController do controller do def success authorize :dashboard, :index? diff --git a/spec/controllers/admin/custom_emojis_controller_spec.rb b/spec/controllers/admin/custom_emojis_controller_spec.rb index 9e732200dd..57c2a6d21b 100644 --- a/spec/controllers/admin/custom_emojis_controller_spec.rb +++ b/spec/controllers/admin/custom_emojis_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::CustomEmojisController do +RSpec.describe Admin::CustomEmojisController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/dashboard_controller_spec.rb b/spec/controllers/admin/dashboard_controller_spec.rb index 3e29ce1278..9177be4b6d 100644 --- a/spec/controllers/admin/dashboard_controller_spec.rb +++ b/spec/controllers/admin/dashboard_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DashboardController do +RSpec.describe Admin::DashboardController do render_views describe 'GET #index' do diff --git a/spec/controllers/admin/follow_recommendations_controller_spec.rb b/spec/controllers/admin/follow_recommendations_controller_spec.rb index f62aa6e4b2..d614f2ef43 100644 --- a/spec/controllers/admin/follow_recommendations_controller_spec.rb +++ b/spec/controllers/admin/follow_recommendations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::FollowRecommendationsController do +RSpec.describe Admin::FollowRecommendationsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/invites_controller_spec.rb b/spec/controllers/admin/invites_controller_spec.rb index 8638f8e214..b6471e80b2 100644 --- a/spec/controllers/admin/invites_controller_spec.rb +++ b/spec/controllers/admin/invites_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::InvitesController do +RSpec.describe Admin::InvitesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/ip_blocks_controller_spec.rb b/spec/controllers/admin/ip_blocks_controller_spec.rb index 05190f1340..2e32db5a01 100644 --- a/spec/controllers/admin/ip_blocks_controller_spec.rb +++ b/spec/controllers/admin/ip_blocks_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::IpBlocksController do +RSpec.describe Admin::IpBlocksController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/relationships_controller_spec.rb b/spec/controllers/admin/relationships_controller_spec.rb index 1099a37a3b..214be7c7cd 100644 --- a/spec/controllers/admin/relationships_controller_spec.rb +++ b/spec/controllers/admin/relationships_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RelationshipsController do +RSpec.describe Admin::RelationshipsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/relays_controller_spec.rb b/spec/controllers/admin/relays_controller_spec.rb index ca351c39b2..c6251a6d76 100644 --- a/spec/controllers/admin/relays_controller_spec.rb +++ b/spec/controllers/admin/relays_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RelaysController do +RSpec.describe Admin::RelaysController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/report_notes_controller_spec.rb b/spec/controllers/admin/report_notes_controller_spec.rb index 8d5b5c7aec..423a64ebc4 100644 --- a/spec/controllers/admin/report_notes_controller_spec.rb +++ b/spec/controllers/admin/report_notes_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::ReportNotesController do +RSpec.describe Admin::ReportNotesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/reports/actions_controller_spec.rb b/spec/controllers/admin/reports/actions_controller_spec.rb index 06d4b31f54..6185702c30 100644 --- a/spec/controllers/admin/reports/actions_controller_spec.rb +++ b/spec/controllers/admin/reports/actions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Reports::ActionsController do +RSpec.describe Admin::Reports::ActionsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/reports_controller_spec.rb b/spec/controllers/admin/reports_controller_spec.rb index 67fb28e7a5..d07468a37b 100644 --- a/spec/controllers/admin/reports_controller_spec.rb +++ b/spec/controllers/admin/reports_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::ReportsController do +RSpec.describe Admin::ReportsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/roles_controller_spec.rb b/spec/controllers/admin/roles_controller_spec.rb index 223d0a472a..2c43a0ca87 100644 --- a/spec/controllers/admin/roles_controller_spec.rb +++ b/spec/controllers/admin/roles_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RolesController do +RSpec.describe Admin::RolesController do render_views let(:permissions) { UserRole::Flags::NONE } diff --git a/spec/controllers/admin/rules_controller_spec.rb b/spec/controllers/admin/rules_controller_spec.rb index 92ffb41567..1b2a2010d0 100644 --- a/spec/controllers/admin/rules_controller_spec.rb +++ b/spec/controllers/admin/rules_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::RulesController do +RSpec.describe Admin::RulesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/site_uploads_controller_spec.rb b/spec/controllers/admin/site_uploads_controller_spec.rb index 4ea37f396a..9c65c63b78 100644 --- a/spec/controllers/admin/site_uploads_controller_spec.rb +++ b/spec/controllers/admin/site_uploads_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SiteUploadsController do +RSpec.describe Admin::SiteUploadsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/statuses_controller_spec.rb b/spec/controllers/admin/statuses_controller_spec.rb index 4ab6d109ef..e6053a6e8a 100644 --- a/spec/controllers/admin/statuses_controller_spec.rb +++ b/spec/controllers/admin/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::StatusesController do +RSpec.describe Admin::StatusesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb b/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb index 95ed38d6b1..ce62a13db6 100644 --- a/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb +++ b/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::Links::PreviewCardProvidersController do +RSpec.describe Admin::Trends::Links::PreviewCardProvidersController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/links_controller_spec.rb b/spec/controllers/admin/trends/links_controller_spec.rb index 7c67f5e5aa..984f3007c2 100644 --- a/spec/controllers/admin/trends/links_controller_spec.rb +++ b/spec/controllers/admin/trends/links_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::LinksController do +RSpec.describe Admin::Trends::LinksController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/statuses_controller_spec.rb b/spec/controllers/admin/trends/statuses_controller_spec.rb index b752234d3c..eecf4ab4f2 100644 --- a/spec/controllers/admin/trends/statuses_controller_spec.rb +++ b/spec/controllers/admin/trends/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::StatusesController do +RSpec.describe Admin::Trends::StatusesController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/trends/tags_controller_spec.rb b/spec/controllers/admin/trends/tags_controller_spec.rb index 4f74a55455..51ad1860c8 100644 --- a/spec/controllers/admin/trends/tags_controller_spec.rb +++ b/spec/controllers/admin/trends/tags_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::TagsController do +RSpec.describe Admin::Trends::TagsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/users/roles_controller_spec.rb b/spec/controllers/admin/users/roles_controller_spec.rb index 97f69a0b0a..bfc2bb151f 100644 --- a/spec/controllers/admin/users/roles_controller_spec.rb +++ b/spec/controllers/admin/users/roles_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Users::RolesController do +RSpec.describe Admin::Users::RolesController do render_views let(:current_role) { UserRole.create(name: 'Foo', permissions: UserRole::FLAGS[:manage_roles], position: 10) } diff --git a/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb b/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb index eb10d47963..1f0a6ac34d 100644 --- a/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb +++ b/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'webauthn/fake_client' -describe Admin::Users::TwoFactorAuthenticationsController do +RSpec.describe Admin::Users::TwoFactorAuthenticationsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/admin/warning_presets_controller_spec.rb b/spec/controllers/admin/warning_presets_controller_spec.rb index b32a58e990..4171bbad82 100644 --- a/spec/controllers/admin/warning_presets_controller_spec.rb +++ b/spec/controllers/admin/warning_presets_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::WarningPresetsController do +RSpec.describe Admin::WarningPresetsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/webhooks/secrets_controller_spec.rb b/spec/controllers/admin/webhooks/secrets_controller_spec.rb index 291a10fba5..61ae8cdaa5 100644 --- a/spec/controllers/admin/webhooks/secrets_controller_spec.rb +++ b/spec/controllers/admin/webhooks/secrets_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Webhooks::SecretsController do +RSpec.describe Admin::Webhooks::SecretsController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/admin/webhooks_controller_spec.rb b/spec/controllers/admin/webhooks_controller_spec.rb index 17d8506025..4fe787c26c 100644 --- a/spec/controllers/admin/webhooks_controller_spec.rb +++ b/spec/controllers/admin/webhooks_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::WebhooksController do +RSpec.describe Admin::WebhooksController do render_views let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } diff --git a/spec/controllers/api/base_controller_spec.rb b/spec/controllers/api/base_controller_spec.rb index 659d55f801..1e0e7c8f4d 100644 --- a/spec/controllers/api/base_controller_spec.rb +++ b/spec/controllers/api/base_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::BaseController do +RSpec.describe Api::BaseController do controller do def success head 200 diff --git a/spec/controllers/api/web/push_subscriptions_controller_spec.rb b/spec/controllers/api/web/push_subscriptions_controller_spec.rb index 58677841ca..acc0312113 100644 --- a/spec/controllers/api/web/push_subscriptions_controller_spec.rb +++ b/spec/controllers/api/web/push_subscriptions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::Web::PushSubscriptionsController do +RSpec.describe Api::Web::PushSubscriptionsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index f595e8ca19..4ee951628e 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ApplicationController do +RSpec.describe ApplicationController do controller do def success head 200 diff --git a/spec/controllers/auth/challenges_controller_spec.rb b/spec/controllers/auth/challenges_controller_spec.rb index 32bbedde63..56fdfa61b5 100644 --- a/spec/controllers/auth/challenges_controller_spec.rb +++ b/spec/controllers/auth/challenges_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::ChallengesController do +RSpec.describe Auth::ChallengesController do render_views let(:password) { 'foobar12345' } diff --git a/spec/controllers/auth/confirmations_controller_spec.rb b/spec/controllers/auth/confirmations_controller_spec.rb index 15403e8ea1..a5b212e660 100644 --- a/spec/controllers/auth/confirmations_controller_spec.rb +++ b/spec/controllers/auth/confirmations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::ConfirmationsController do +RSpec.describe Auth::ConfirmationsController do render_views describe 'GET #new' do diff --git a/spec/controllers/auth/passwords_controller_spec.rb b/spec/controllers/auth/passwords_controller_spec.rb index d70490abcf..9ccbb9e494 100644 --- a/spec/controllers/auth/passwords_controller_spec.rb +++ b/spec/controllers/auth/passwords_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::PasswordsController do +RSpec.describe Auth::PasswordsController do include Devise::Test::ControllerHelpers describe 'GET #new' do diff --git a/spec/controllers/auth/setup_controller_spec.rb b/spec/controllers/auth/setup_controller_spec.rb index 75e42aaf96..28b07cb4b2 100644 --- a/spec/controllers/auth/setup_controller_spec.rb +++ b/spec/controllers/auth/setup_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Auth::SetupController do +RSpec.describe Auth::SetupController do render_views describe 'GET #show' do diff --git a/spec/controllers/authorize_interactions_controller_spec.rb b/spec/controllers/authorize_interactions_controller_spec.rb index ed55df08d9..2a0422efa9 100644 --- a/spec/controllers/authorize_interactions_controller_spec.rb +++ b/spec/controllers/authorize_interactions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AuthorizeInteractionsController do +RSpec.describe AuthorizeInteractionsController do render_views describe 'GET #show' do diff --git a/spec/controllers/concerns/account_controller_concern_spec.rb b/spec/controllers/concerns/account_controller_concern_spec.rb index 122ef21e93..3eee46d7b9 100644 --- a/spec/controllers/concerns/account_controller_concern_spec.rb +++ b/spec/controllers/concerns/account_controller_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountControllerConcern do +RSpec.describe AccountControllerConcern do controller(ApplicationController) do include AccountControllerConcern diff --git a/spec/controllers/concerns/api/error_handling_spec.rb b/spec/controllers/concerns/api/error_handling_spec.rb index 9b36fc20a3..eff01605d2 100644 --- a/spec/controllers/concerns/api/error_handling_spec.rb +++ b/spec/controllers/concerns/api/error_handling_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::ErrorHandling do +RSpec.describe Api::ErrorHandling do before do stub_const('FakeService', Class.new) end diff --git a/spec/controllers/concerns/api/rate_limit_headers_spec.rb b/spec/controllers/concerns/api/rate_limit_headers_spec.rb index 2050de2aed..6372c94e6c 100644 --- a/spec/controllers/concerns/api/rate_limit_headers_spec.rb +++ b/spec/controllers/concerns/api/rate_limit_headers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Api::RateLimitHeaders do +RSpec.describe Api::RateLimitHeaders do controller(ApplicationController) do include Api::RateLimitHeaders diff --git a/spec/controllers/concerns/localized_spec.rb b/spec/controllers/concerns/localized_spec.rb index ce31e786f0..b1f805ae50 100644 --- a/spec/controllers/concerns/localized_spec.rb +++ b/spec/controllers/concerns/localized_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Localized do +RSpec.describe Localized do controller(ApplicationController) do include Localized diff --git a/spec/controllers/concerns/settings/export_controller_concern_spec.rb b/spec/controllers/concerns/settings/export_controller_concern_spec.rb index a19af8689a..2c67991e3a 100644 --- a/spec/controllers/concerns/settings/export_controller_concern_spec.rb +++ b/spec/controllers/concerns/settings/export_controller_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::ExportControllerConcern do +RSpec.describe Settings::ExportControllerConcern do controller(ApplicationController) do include Settings::ExportControllerConcern diff --git a/spec/controllers/concerns/user_tracking_concern_spec.rb b/spec/controllers/concerns/user_tracking_concern_spec.rb index f23d482f5f..cc61e285cc 100644 --- a/spec/controllers/concerns/user_tracking_concern_spec.rb +++ b/spec/controllers/concerns/user_tracking_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UserTrackingConcern do +RSpec.describe UserTrackingConcern do controller(ApplicationController) do include UserTrackingConcern diff --git a/spec/controllers/filters/statuses_controller_spec.rb b/spec/controllers/filters/statuses_controller_spec.rb index 2c80613302..f1fed76fca 100644 --- a/spec/controllers/filters/statuses_controller_spec.rb +++ b/spec/controllers/filters/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Filters::StatusesController do +RSpec.describe Filters::StatusesController do render_views describe 'GET #index' do diff --git a/spec/controllers/filters_controller_spec.rb b/spec/controllers/filters_controller_spec.rb index 091f714bb3..de043e8ae3 100644 --- a/spec/controllers/filters_controller_spec.rb +++ b/spec/controllers/filters_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FiltersController do +RSpec.describe FiltersController do render_views describe 'GET #index' do diff --git a/spec/controllers/follower_accounts_controller_spec.rb b/spec/controllers/follower_accounts_controller_spec.rb index dd78c96c05..e84528d13e 100644 --- a/spec/controllers/follower_accounts_controller_spec.rb +++ b/spec/controllers/follower_accounts_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FollowerAccountsController do +RSpec.describe FollowerAccountsController do render_views let(:alice) { Fabricate(:account, username: 'alice') } diff --git a/spec/controllers/following_accounts_controller_spec.rb b/spec/controllers/following_accounts_controller_spec.rb index 7bb78fb420..1e01b9f494 100644 --- a/spec/controllers/following_accounts_controller_spec.rb +++ b/spec/controllers/following_accounts_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FollowingAccountsController do +RSpec.describe FollowingAccountsController do render_views let(:alice) { Fabricate(:account, username: 'alice') } diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb index 5221941267..192c5b00ba 100644 --- a/spec/controllers/invites_controller_spec.rb +++ b/spec/controllers/invites_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe InvitesController do +RSpec.describe InvitesController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/oauth/authorized_applications_controller_spec.rb b/spec/controllers/oauth/authorized_applications_controller_spec.rb index 3fd9f9499f..52d3dbde83 100644 --- a/spec/controllers/oauth/authorized_applications_controller_spec.rb +++ b/spec/controllers/oauth/authorized_applications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Oauth::AuthorizedApplicationsController do +RSpec.describe Oauth::AuthorizedApplicationsController do render_views describe 'GET #index' do diff --git a/spec/controllers/relationships_controller_spec.rb b/spec/controllers/relationships_controller_spec.rb index 9495fc214f..323fcc995d 100644 --- a/spec/controllers/relationships_controller_spec.rb +++ b/spec/controllers/relationships_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RelationshipsController do +RSpec.describe RelationshipsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/aliases_controller_spec.rb b/spec/controllers/settings/aliases_controller_spec.rb index 18e568be0b..4858c15298 100644 --- a/spec/controllers/settings/aliases_controller_spec.rb +++ b/spec/controllers/settings/aliases_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::AliasesController do +RSpec.describe Settings::AliasesController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/applications_controller_spec.rb b/spec/controllers/settings/applications_controller_spec.rb index ce2e0749a7..721741bacb 100644 --- a/spec/controllers/settings/applications_controller_spec.rb +++ b/spec/controllers/settings/applications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::ApplicationsController do +RSpec.describe Settings::ApplicationsController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/deletes_controller_spec.rb b/spec/controllers/settings/deletes_controller_spec.rb index 3342599bc1..98104b8454 100644 --- a/spec/controllers/settings/deletes_controller_spec.rb +++ b/spec/controllers/settings/deletes_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::DeletesController do +RSpec.describe Settings::DeletesController do render_views describe 'GET #show' do diff --git a/spec/controllers/settings/exports_controller_spec.rb b/spec/controllers/settings/exports_controller_spec.rb index 3399f78ac5..1eafabc7e5 100644 --- a/spec/controllers/settings/exports_controller_spec.rb +++ b/spec/controllers/settings/exports_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::ExportsController do +RSpec.describe Settings::ExportsController do render_views describe 'GET #show' do diff --git a/spec/controllers/settings/featured_tags_controller_spec.rb b/spec/controllers/settings/featured_tags_controller_spec.rb index 4e1dd52945..a56ae1c498 100644 --- a/spec/controllers/settings/featured_tags_controller_spec.rb +++ b/spec/controllers/settings/featured_tags_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::FeaturedTagsController do +RSpec.describe Settings::FeaturedTagsController do render_views shared_examples 'authenticate user' do diff --git a/spec/controllers/settings/login_activities_controller_spec.rb b/spec/controllers/settings/login_activities_controller_spec.rb index 294bf85c97..3447620abb 100644 --- a/spec/controllers/settings/login_activities_controller_spec.rb +++ b/spec/controllers/settings/login_activities_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::LoginActivitiesController do +RSpec.describe Settings::LoginActivitiesController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/migration/redirects_controller_spec.rb b/spec/controllers/settings/migration/redirects_controller_spec.rb index b909a02668..d853fe8ae6 100644 --- a/spec/controllers/settings/migration/redirects_controller_spec.rb +++ b/spec/controllers/settings/migration/redirects_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Migration::RedirectsController do +RSpec.describe Settings::Migration::RedirectsController do render_views let!(:user) { Fabricate(:user, password: 'testtest') } diff --git a/spec/controllers/settings/migrations_controller_spec.rb b/spec/controllers/settings/migrations_controller_spec.rb index f3340574d0..93c5de0899 100644 --- a/spec/controllers/settings/migrations_controller_spec.rb +++ b/spec/controllers/settings/migrations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::MigrationsController do +RSpec.describe Settings::MigrationsController do render_views shared_examples 'authenticate user' do diff --git a/spec/controllers/settings/pictures_controller_spec.rb b/spec/controllers/settings/pictures_controller_spec.rb index 705878f03d..683d231ed1 100644 --- a/spec/controllers/settings/pictures_controller_spec.rb +++ b/spec/controllers/settings/pictures_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::PicturesController do +RSpec.describe Settings::PicturesController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/preferences/appearance_controller_spec.rb b/spec/controllers/settings/preferences/appearance_controller_spec.rb index 84b8277250..14f9b244ab 100644 --- a/spec/controllers/settings/preferences/appearance_controller_spec.rb +++ b/spec/controllers/settings/preferences/appearance_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::AppearanceController do +RSpec.describe Settings::Preferences::AppearanceController do render_views let!(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/preferences/base_controller_spec.rb b/spec/controllers/settings/preferences/base_controller_spec.rb index 53b3a461ed..75fc999a48 100644 --- a/spec/controllers/settings/preferences/base_controller_spec.rb +++ b/spec/controllers/settings/preferences/base_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::BaseController do +RSpec.describe Settings::Preferences::BaseController do describe 'after_update_redirect_path' do it 'raises error when called' do expect { described_class.new.send(:after_update_redirect_path) }.to raise_error(/Override/) diff --git a/spec/controllers/settings/preferences/notifications_controller_spec.rb b/spec/controllers/settings/preferences/notifications_controller_spec.rb index e0f0bc55a7..edfdea50e0 100644 --- a/spec/controllers/settings/preferences/notifications_controller_spec.rb +++ b/spec/controllers/settings/preferences/notifications_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::NotificationsController do +RSpec.describe Settings::Preferences::NotificationsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/preferences/other_controller_spec.rb b/spec/controllers/settings/preferences/other_controller_spec.rb index 61a94a4142..117fdeea7c 100644 --- a/spec/controllers/settings/preferences/other_controller_spec.rb +++ b/spec/controllers/settings/preferences/other_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::Preferences::OtherController do +RSpec.describe Settings::Preferences::OtherController do render_views let(:user) { Fabricate(:user, chosen_languages: []) } diff --git a/spec/controllers/settings/sessions_controller_spec.rb b/spec/controllers/settings/sessions_controller_spec.rb index a4248e1bde..c098af7485 100644 --- a/spec/controllers/settings/sessions_controller_spec.rb +++ b/spec/controllers/settings/sessions_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::SessionsController do +RSpec.describe Settings::SessionsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb index 1c8b483a0a..34eaacdf49 100644 --- a/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthentication::ConfirmationsController do +RSpec.describe Settings::TwoFactorAuthentication::ConfirmationsController do render_views shared_examples 'renders :new' do diff --git a/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb index 007df87d95..a03c4a4adb 100644 --- a/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/otp_authentication_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthentication::OtpAuthenticationController do +RSpec.describe Settings::TwoFactorAuthentication::OtpAuthenticationController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb index dbc2e3059c..0defc52cde 100644 --- a/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthentication::RecoveryCodesController do +RSpec.describe Settings::TwoFactorAuthentication::RecoveryCodesController do render_views describe 'POST #create' do diff --git a/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb b/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb index 41a3ba5eb5..cccf3c51d3 100644 --- a/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'webauthn/fake_client' -describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do +RSpec.describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do render_views let(:user) { Fabricate(:user) } diff --git a/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb b/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb index de0d28463b..c55f113d4d 100644 --- a/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb +++ b/spec/controllers/settings/two_factor_authentication_methods_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Settings::TwoFactorAuthenticationMethodsController do +RSpec.describe Settings::TwoFactorAuthenticationMethodsController do render_views context 'when not signed in' do diff --git a/spec/controllers/statuses_controller_spec.rb b/spec/controllers/statuses_controller_spec.rb index 084dcfaa75..289109a1fa 100644 --- a/spec/controllers/statuses_controller_spec.rb +++ b/spec/controllers/statuses_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusesController do +RSpec.describe StatusesController do render_views describe 'GET #show' do diff --git a/spec/fabrication/fabricators_spec.rb b/spec/fabrication/fabricators_spec.rb index 2cf45041a4..f7bb504543 100644 --- a/spec/fabrication/fabricators_spec.rb +++ b/spec/fabrication/fabricators_spec.rb @@ -5,7 +5,7 @@ require 'rails_helper' Fabrication.manager.load_definitions if Fabrication.manager.empty? Fabrication.manager.schematics.map(&:first).each do |factory_name| - describe "The #{factory_name} factory" do + RSpec.describe "The #{factory_name} factory" do it 'is able to create valid records' do records = Fabricate.times(2, factory_name) # Create multiple of each to uncover uniqueness issues expect(records).to all(be_valid) diff --git a/spec/generators/post_deployment_migration_generator_spec.rb b/spec/generators/post_deployment_migration_generator_spec.rb index 55e70a7917..1aa8e0915c 100644 --- a/spec/generators/post_deployment_migration_generator_spec.rb +++ b/spec/generators/post_deployment_migration_generator_spec.rb @@ -6,7 +6,7 @@ require 'rails/generators/testing/assertions' require 'generators/post_deployment_migration/post_deployment_migration_generator' -describe PostDeploymentMigrationGenerator, type: :generator do +RSpec.describe PostDeploymentMigrationGenerator, type: :generator do include Rails::Generators::Testing::Behavior include Rails::Generators::Testing::Assertions include FileUtils diff --git a/spec/helpers/admin/dashboard_helper_spec.rb b/spec/helpers/admin/dashboard_helper_spec.rb index 59062e4839..9c674fb4b9 100644 --- a/spec/helpers/admin/dashboard_helper_spec.rb +++ b/spec/helpers/admin/dashboard_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DashboardHelper do +RSpec.describe Admin::DashboardHelper do describe 'relevant_account_timestamp' do context 'with an account with older sign in' do let(:account) { Fabricate(:account) } diff --git a/spec/helpers/admin/disputes_helper_spec.rb b/spec/helpers/admin/disputes_helper_spec.rb index 5f9a85df86..a6ac021bd4 100644 --- a/spec/helpers/admin/disputes_helper_spec.rb +++ b/spec/helpers/admin/disputes_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DisputesHelper do +RSpec.describe Admin::DisputesHelper do describe 'strike_action_label' do it 'returns html describing the appeal' do adam = Account.new(username: 'Adam') diff --git a/spec/helpers/admin/filter_helper_spec.rb b/spec/helpers/admin/filter_helper_spec.rb index 40ed63239f..d07a6e1bb7 100644 --- a/spec/helpers/admin/filter_helper_spec.rb +++ b/spec/helpers/admin/filter_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::FilterHelper do +RSpec.describe Admin::FilterHelper do it 'Uses filter_link_to to create filter links' do params = ActionController::Parameters.new( { test: 'test' } diff --git a/spec/helpers/admin/trends/statuses_helper_spec.rb b/spec/helpers/admin/trends/statuses_helper_spec.rb index 92caae6909..fa5c337e97 100644 --- a/spec/helpers/admin/trends/statuses_helper_spec.rb +++ b/spec/helpers/admin/trends/statuses_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Trends::StatusesHelper do +RSpec.describe Admin::Trends::StatusesHelper do describe '.one_line_preview' do before do allow(helper).to receive(:current_user).and_return(Fabricate.build(:user)) diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 0bfce6946b..c2e618c7de 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ApplicationHelper do +RSpec.describe ApplicationHelper do describe 'body_classes' do context 'with a body class string from a controller' do before { helper.extend controller_helpers } diff --git a/spec/helpers/flashes_helper_spec.rb b/spec/helpers/flashes_helper_spec.rb index a6a3b062d7..aaef7ab144 100644 --- a/spec/helpers/flashes_helper_spec.rb +++ b/spec/helpers/flashes_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FlashesHelper do +RSpec.describe FlashesHelper do describe 'user_facing_flashes' do before do # rubocop:disable Rails/I18nLocaleTexts diff --git a/spec/helpers/formatting_helper_spec.rb b/spec/helpers/formatting_helper_spec.rb index d6e7631f66..136a609b1c 100644 --- a/spec/helpers/formatting_helper_spec.rb +++ b/spec/helpers/formatting_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FormattingHelper do +RSpec.describe FormattingHelper do include Devise::Test::ControllerHelpers describe '#rss_status_content_format' do diff --git a/spec/helpers/instance_helper_spec.rb b/spec/helpers/instance_helper_spec.rb index 9a2d884158..e7b15e6513 100644 --- a/spec/helpers/instance_helper_spec.rb +++ b/spec/helpers/instance_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe InstanceHelper do +RSpec.describe InstanceHelper do describe 'site_title' do it 'Uses the Setting.site_title value when it exists' do Setting.site_title = 'New site title' diff --git a/spec/helpers/json_ld_helper_spec.rb b/spec/helpers/json_ld_helper_spec.rb index f4b849d7a1..d76c5167a7 100644 --- a/spec/helpers/json_ld_helper_spec.rb +++ b/spec/helpers/json_ld_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe JsonLdHelper do +RSpec.describe JsonLdHelper do describe '#equals_or_includes?' do it 'returns true when value equals' do expect(helper.equals_or_includes?('foo', 'foo')).to be true diff --git a/spec/helpers/languages_helper_spec.rb b/spec/helpers/languages_helper_spec.rb index 99461b293b..dd9b6004d1 100644 --- a/spec/helpers/languages_helper_spec.rb +++ b/spec/helpers/languages_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe LanguagesHelper do +RSpec.describe LanguagesHelper do describe 'the SUPPORTED_LOCALES constant' do it 'includes all i18n locales' do expect(Set.new(described_class::SUPPORTED_LOCALES.keys + described_class::REGIONAL_LOCALE_NAMES.keys)).to include(*I18n.available_locales) diff --git a/spec/helpers/media_component_helper_spec.rb b/spec/helpers/media_component_helper_spec.rb index af5d92769c..ec87a707cb 100644 --- a/spec/helpers/media_component_helper_spec.rb +++ b/spec/helpers/media_component_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe MediaComponentHelper do +RSpec.describe MediaComponentHelper do before { helper.extend controller_helpers } describe 'render_video_component' do diff --git a/spec/helpers/react_component_helper_spec.rb b/spec/helpers/react_component_helper_spec.rb index 28208b619b..202694fbe4 100644 --- a/spec/helpers/react_component_helper_spec.rb +++ b/spec/helpers/react_component_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ReactComponentHelper do +RSpec.describe ReactComponentHelper do describe 'react_component' do context 'with no block passed in' do let(:result) { helper.react_component('name', { one: :two }) } diff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rb index ca447d8ce1..ecff2edbfa 100644 --- a/spec/helpers/settings_helper_spec.rb +++ b/spec/helpers/settings_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe SettingsHelper do +RSpec.describe SettingsHelper do describe 'session_device_icon' do context 'with a mobile device' do let(:session) { SessionActivation.new(user_agent: 'Mozilla/5.0 (iPhone)') } diff --git a/spec/helpers/statuses_helper_spec.rb b/spec/helpers/statuses_helper_spec.rb index 66eb996f99..8809d0afae 100644 --- a/spec/helpers/statuses_helper_spec.rb +++ b/spec/helpers/statuses_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusesHelper do +RSpec.describe StatusesHelper do describe 'status_text_summary' do context 'with blank text' do let(:status) { Status.new(spoiler_text: '') } diff --git a/spec/helpers/theme_helper_spec.rb b/spec/helpers/theme_helper_spec.rb index c0b6380a1f..7663e59436 100644 --- a/spec/helpers/theme_helper_spec.rb +++ b/spec/helpers/theme_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ThemeHelper do +RSpec.describe ThemeHelper do describe 'theme_style_tags' do let(:result) { helper.theme_style_tags(theme) } diff --git a/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb b/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb index 2b14e6956c..c8683afda9 100644 --- a/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/instance_accounts_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::InstanceAccountsDimension do +RSpec.describe Admin::Metrics::Dimension::InstanceAccountsDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb b/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb index e4e9fbe2b7..c633041f9d 100644 --- a/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/instance_languages_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::InstanceLanguagesDimension do +RSpec.describe Admin::Metrics::Dimension::InstanceLanguagesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb b/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb index 9d80970693..801b3d84df 100644 --- a/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/languages_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::LanguagesDimension do +RSpec.describe Admin::Metrics::Dimension::LanguagesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb b/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb index 5661441d5d..d86ccd099a 100644 --- a/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/servers_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::ServersDimension do +RSpec.describe Admin::Metrics::Dimension::ServersDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb b/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb index 5d31121ab3..5b0fb902e0 100644 --- a/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/software_versions_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::SoftwareVersionsDimension do +RSpec.describe Admin::Metrics::Dimension::SoftwareVersionsDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb b/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb index 5fa5aa8af5..ca7f716afd 100644 --- a/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/sources_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::SourcesDimension do +RSpec.describe Admin::Metrics::Dimension::SourcesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb b/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb index 96ff9c66dc..4be5ed30ee 100644 --- a/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/space_usage_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::SpaceUsageDimension do +RSpec.describe Admin::Metrics::Dimension::SpaceUsageDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb b/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb index c1dfd0eaf4..166edf92b0 100644 --- a/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/tag_languages_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::TagLanguagesDimension do +RSpec.describe Admin::Metrics::Dimension::TagLanguagesDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb b/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb index 025cf1b7ec..7391b55456 100644 --- a/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension/tag_servers_dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension::TagServersDimension do +RSpec.describe Admin::Metrics::Dimension::TagServersDimension do subject { described_class.new(start_at, end_at, limit, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/dimension_spec.rb b/spec/lib/admin/metrics/dimension_spec.rb index 109250b72b..0a52d442be 100644 --- a/spec/lib/admin/metrics/dimension_spec.rb +++ b/spec/lib/admin/metrics/dimension_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Dimension do +RSpec.describe Admin::Metrics::Dimension do describe '.retrieve' do subject { described_class.retrieve(reports, start_at, end_at, 5, params) } diff --git a/spec/lib/admin/metrics/measure/active_users_measure_spec.rb b/spec/lib/admin/metrics/measure/active_users_measure_spec.rb index 38ee14075b..653e677354 100644 --- a/spec/lib/admin/metrics/measure/active_users_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/active_users_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::ActiveUsersMeasure do +RSpec.describe Admin::Metrics::Measure::ActiveUsersMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb index 0d2ad31c39..f974f2ca46 100644 --- a/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_accounts_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceAccountsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceAccountsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb index 27bf30d17d..643249fa4e 100644 --- a/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_followers_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceFollowersMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceFollowersMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb index 9961ea56c4..70f5004fef 100644 --- a/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_follows_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceFollowsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceFollowsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb index 3634450930..11f13b85bc 100644 --- a/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_media_attachments_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceMediaAttachmentsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceMediaAttachmentsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb index ca64049d92..62c9dec464 100644 --- a/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_reports_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceReportsMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceReportsMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb b/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb index ac28658ea0..0fc903a2a8 100644 --- a/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/instance_statuses_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InstanceStatusesMeasure do +RSpec.describe Admin::Metrics::Measure::InstanceStatusesMeasure do subject { described_class.new(start_at, end_at, params) } let(:domain) { 'example.com' } diff --git a/spec/lib/admin/metrics/measure/interactions_measure_spec.rb b/spec/lib/admin/metrics/measure/interactions_measure_spec.rb index ed333380cf..edbec2eabf 100644 --- a/spec/lib/admin/metrics/measure/interactions_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/interactions_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::InteractionsMeasure do +RSpec.describe Admin::Metrics::Measure::InteractionsMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/new_users_measure_spec.rb b/spec/lib/admin/metrics/measure/new_users_measure_spec.rb index 085acbcede..5c03b67a18 100644 --- a/spec/lib/admin/metrics/measure/new_users_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/new_users_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::NewUsersMeasure do +RSpec.describe Admin::Metrics::Measure::NewUsersMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb b/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb index d5ba78527e..f4d3a66454 100644 --- a/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/opened_reports_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::OpenedReportsMeasure do +RSpec.describe Admin::Metrics::Measure::OpenedReportsMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb b/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb index f7b497590d..432dbbe796 100644 --- a/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/resolved_reports_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::ResolvedReportsMeasure do +RSpec.describe Admin::Metrics::Measure::ResolvedReportsMeasure do subject { described_class.new(start_at, end_at, params) } let(:start_at) { 2.days.ago } diff --git a/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb b/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb index b33ae7bb71..577b1260ff 100644 --- a/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/tag_accounts_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::TagAccountsMeasure do +RSpec.describe Admin::Metrics::Measure::TagAccountsMeasure do subject { described_class.new(start_at, end_at, params) } let!(:tag) { Fabricate(:tag) } diff --git a/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb b/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb index e1e2ced43a..42715e5adc 100644 --- a/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/tag_servers_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::TagServersMeasure do +RSpec.describe Admin::Metrics::Measure::TagServersMeasure do subject { described_class.new(start_at, end_at, params) } let!(:tag) { Fabricate(:tag) } diff --git a/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb b/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb index dd66f00de0..b258455dab 100644 --- a/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb +++ b/spec/lib/admin/metrics/measure/tag_uses_measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure::TagUsesMeasure do +RSpec.describe Admin::Metrics::Measure::TagUsesMeasure do subject { described_class.new(start_at, end_at, params) } let!(:tag) { Fabricate(:tag) } diff --git a/spec/lib/admin/metrics/measure_spec.rb b/spec/lib/admin/metrics/measure_spec.rb index c9809b0f79..49a5aecc61 100644 --- a/spec/lib/admin/metrics/measure_spec.rb +++ b/spec/lib/admin/metrics/measure_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::Metrics::Measure do +RSpec.describe Admin::Metrics::Measure do describe '.retrieve' do subject { described_class.retrieve(reports, start_at, end_at, params) } diff --git a/spec/lib/admin/system_check/base_check_spec.rb b/spec/lib/admin/system_check/base_check_spec.rb index fdd9f6b6c4..769e0e1d18 100644 --- a/spec/lib/admin/system_check/base_check_spec.rb +++ b/spec/lib/admin/system_check/base_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::BaseCheck do +RSpec.describe Admin::SystemCheck::BaseCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/database_schema_check_spec.rb b/spec/lib/admin/system_check/database_schema_check_spec.rb index db1dcb52fa..311d524956 100644 --- a/spec/lib/admin/system_check/database_schema_check_spec.rb +++ b/spec/lib/admin/system_check/database_schema_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::DatabaseSchemaCheck do +RSpec.describe Admin::SystemCheck::DatabaseSchemaCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/elasticsearch_check_spec.rb b/spec/lib/admin/system_check/elasticsearch_check_spec.rb index 8f210579d0..05d204c453 100644 --- a/spec/lib/admin/system_check/elasticsearch_check_spec.rb +++ b/spec/lib/admin/system_check/elasticsearch_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::ElasticsearchCheck do +RSpec.describe Admin::SystemCheck::ElasticsearchCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/media_privacy_check_spec.rb b/spec/lib/admin/system_check/media_privacy_check_spec.rb index 316bf12156..0d5bcdb3e8 100644 --- a/spec/lib/admin/system_check/media_privacy_check_spec.rb +++ b/spec/lib/admin/system_check/media_privacy_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::MediaPrivacyCheck do +RSpec.describe Admin::SystemCheck::MediaPrivacyCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/message_spec.rb b/spec/lib/admin/system_check/message_spec.rb index c0671f3452..81ef4f2f09 100644 --- a/spec/lib/admin/system_check/message_spec.rb +++ b/spec/lib/admin/system_check/message_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::Message do +RSpec.describe Admin::SystemCheck::Message do subject(:check) { described_class.new(:key_value, :value_value, :action_value, :critical_value) } it 'providers readers when initialized' do diff --git a/spec/lib/admin/system_check/rules_check_spec.rb b/spec/lib/admin/system_check/rules_check_spec.rb index fb3293fb2d..32650d9cd8 100644 --- a/spec/lib/admin/system_check/rules_check_spec.rb +++ b/spec/lib/admin/system_check/rules_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::RulesCheck do +RSpec.describe Admin::SystemCheck::RulesCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/sidekiq_process_check_spec.rb b/spec/lib/admin/system_check/sidekiq_process_check_spec.rb index 9bd9daddf6..992fd7aee0 100644 --- a/spec/lib/admin/system_check/sidekiq_process_check_spec.rb +++ b/spec/lib/admin/system_check/sidekiq_process_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::SidekiqProcessCheck do +RSpec.describe Admin::SystemCheck::SidekiqProcessCheck do subject(:check) { described_class.new(user) } let(:user) { Fabricate(:user) } diff --git a/spec/lib/admin/system_check/software_version_check_spec.rb b/spec/lib/admin/system_check/software_version_check_spec.rb index de4335fc51..1affaa3a96 100644 --- a/spec/lib/admin/system_check/software_version_check_spec.rb +++ b/spec/lib/admin/system_check/software_version_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck::SoftwareVersionCheck do +RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do include RoutingHelper subject(:check) { described_class.new(user) } diff --git a/spec/lib/admin/system_check_spec.rb b/spec/lib/admin/system_check_spec.rb index 30048fd3ad..92852ab025 100644 --- a/spec/lib/admin/system_check_spec.rb +++ b/spec/lib/admin/system_check_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SystemCheck do +RSpec.describe Admin::SystemCheck do let(:user) { Fabricate(:user) } describe 'perform' do diff --git a/spec/lib/annual_report_spec.rb b/spec/lib/annual_report_spec.rb index ffb742697b..bd4d0f3387 100644 --- a/spec/lib/annual_report_spec.rb +++ b/spec/lib/annual_report_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AnnualReport do +RSpec.describe AnnualReport do describe '#generate' do subject { described_class.new(account, Time.zone.now.year) } diff --git a/spec/lib/cache_buster_spec.rb b/spec/lib/cache_buster_spec.rb index 84085608e8..f7cff9c1c3 100644 --- a/spec/lib/cache_buster_spec.rb +++ b/spec/lib/cache_buster_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe CacheBuster do +RSpec.describe CacheBuster do subject { described_class.new(secret_header: secret_header, secret: secret, http_method: http_method) } let(:secret_header) { nil } diff --git a/spec/lib/connection_pool/shared_connection_pool_spec.rb b/spec/lib/connection_pool/shared_connection_pool_spec.rb index a2fe75f742..2352703b5a 100644 --- a/spec/lib/connection_pool/shared_connection_pool_spec.rb +++ b/spec/lib/connection_pool/shared_connection_pool_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ConnectionPool::SharedConnectionPool do +RSpec.describe ConnectionPool::SharedConnectionPool do subject { described_class.new(size: 5, timeout: 5) { |site| mini_connection_class.new(site) } } let(:mini_connection_class) do diff --git a/spec/lib/connection_pool/shared_timed_stack_spec.rb b/spec/lib/connection_pool/shared_timed_stack_spec.rb index 04d550eec5..7469664ea0 100644 --- a/spec/lib/connection_pool/shared_timed_stack_spec.rb +++ b/spec/lib/connection_pool/shared_timed_stack_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ConnectionPool::SharedTimedStack do +RSpec.describe ConnectionPool::SharedTimedStack do subject { described_class.new(5) { |site| mini_connection_class.new(site) } } let(:mini_connection_class) do diff --git a/spec/lib/content_security_policy_spec.rb b/spec/lib/content_security_policy_spec.rb index 27a3e80257..5ecea60543 100644 --- a/spec/lib/content_security_policy_spec.rb +++ b/spec/lib/content_security_policy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ContentSecurityPolicy do +RSpec.describe ContentSecurityPolicy do subject { described_class.new } around do |example| diff --git a/spec/lib/delivery_failure_tracker_spec.rb b/spec/lib/delivery_failure_tracker_spec.rb index c8179ebd91..40c8adc4c8 100644 --- a/spec/lib/delivery_failure_tracker_spec.rb +++ b/spec/lib/delivery_failure_tracker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DeliveryFailureTracker do +RSpec.describe DeliveryFailureTracker do subject { described_class.new('http://example.com/inbox') } describe '#track_success!' do diff --git a/spec/lib/extractor_spec.rb b/spec/lib/extractor_spec.rb index af5c62d4c8..bc3ee8ac49 100644 --- a/spec/lib/extractor_spec.rb +++ b/spec/lib/extractor_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Extractor do +RSpec.describe Extractor do describe 'extract_mentions_or_lists_with_indices' do it 'returns an empty array if the given string does not have at signs' do text = 'a string without at signs' diff --git a/spec/lib/fast_ip_map_spec.rb b/spec/lib/fast_ip_map_spec.rb index 78b3ddb054..a3a647e3e3 100644 --- a/spec/lib/fast_ip_map_spec.rb +++ b/spec/lib/fast_ip_map_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FastIpMap do +RSpec.describe FastIpMap do describe '#include?' do subject { described_class.new([IPAddr.new('20.4.0.0/16'), IPAddr.new('145.22.30.0/24'), IPAddr.new('189.45.86.3')]) } diff --git a/spec/lib/hashtag_normalizer_spec.rb b/spec/lib/hashtag_normalizer_spec.rb index fbb9f37c07..796445043a 100644 --- a/spec/lib/hashtag_normalizer_spec.rb +++ b/spec/lib/hashtag_normalizer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe HashtagNormalizer do +RSpec.describe HashtagNormalizer do subject { described_class.new } describe '#normalize' do diff --git a/spec/lib/importer/accounts_index_importer_spec.rb b/spec/lib/importer/accounts_index_importer_spec.rb index 73f9bce399..a5d11c747a 100644 --- a/spec/lib/importer/accounts_index_importer_spec.rb +++ b/spec/lib/importer/accounts_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::AccountsIndexImporter do +RSpec.describe Importer::AccountsIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/base_importer_spec.rb b/spec/lib/importer/base_importer_spec.rb index 78e9a869b8..0d12f975aa 100644 --- a/spec/lib/importer/base_importer_spec.rb +++ b/spec/lib/importer/base_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::BaseImporter do +RSpec.describe Importer::BaseImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/public_statuses_index_importer_spec.rb b/spec/lib/importer/public_statuses_index_importer_spec.rb index bc7c038a97..2407717409 100644 --- a/spec/lib/importer/public_statuses_index_importer_spec.rb +++ b/spec/lib/importer/public_statuses_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::PublicStatusesIndexImporter do +RSpec.describe Importer::PublicStatusesIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/statuses_index_importer_spec.rb b/spec/lib/importer/statuses_index_importer_spec.rb index d5e1c9f2cb..f6fac3bd67 100644 --- a/spec/lib/importer/statuses_index_importer_spec.rb +++ b/spec/lib/importer/statuses_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::StatusesIndexImporter do +RSpec.describe Importer::StatusesIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/importer/tags_index_importer_spec.rb b/spec/lib/importer/tags_index_importer_spec.rb index 348990c01e..44de9e7c34 100644 --- a/spec/lib/importer/tags_index_importer_spec.rb +++ b/spec/lib/importer/tags_index_importer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Importer::TagsIndexImporter do +RSpec.describe Importer::TagsIndexImporter do describe 'import!' do let(:pool) { Concurrent::FixedThreadPool.new(5) } let(:importer) { described_class.new(batch_size: 123, executor: pool) } diff --git a/spec/lib/mastodon/cli/accounts_spec.rb b/spec/lib/mastodon/cli/accounts_spec.rb index 3988e0b027..f6cc28297a 100644 --- a/spec/lib/mastodon/cli/accounts_spec.rb +++ b/spec/lib/mastodon/cli/accounts_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/accounts' -describe Mastodon::CLI::Accounts do +RSpec.describe Mastodon::CLI::Accounts do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/cache_spec.rb b/spec/lib/mastodon/cli/cache_spec.rb index 247a14f9e2..dc571238d2 100644 --- a/spec/lib/mastodon/cli/cache_spec.rb +++ b/spec/lib/mastodon/cli/cache_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/cache' -describe Mastodon::CLI::Cache do +RSpec.describe Mastodon::CLI::Cache do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb index 1745ea01bf..faa5ec7cb8 100644 --- a/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb +++ b/spec/lib/mastodon/cli/canonical_email_blocks_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/canonical_email_blocks' -describe Mastodon::CLI::CanonicalEmailBlocks do +RSpec.describe Mastodon::CLI::CanonicalEmailBlocks do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/domains_spec.rb b/spec/lib/mastodon/cli/domains_spec.rb index 448e6fe42b..d1c26546f0 100644 --- a/spec/lib/mastodon/cli/domains_spec.rb +++ b/spec/lib/mastodon/cli/domains_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/domains' -describe Mastodon::CLI::Domains do +RSpec.describe Mastodon::CLI::Domains do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb index 55e3da0bb8..a5fbd23e65 100644 --- a/spec/lib/mastodon/cli/email_domain_blocks_spec.rb +++ b/spec/lib/mastodon/cli/email_domain_blocks_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/email_domain_blocks' -describe Mastodon::CLI::EmailDomainBlocks do +RSpec.describe Mastodon::CLI::EmailDomainBlocks do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/emoji_spec.rb b/spec/lib/mastodon/cli/emoji_spec.rb index d05e972e77..4336db17d3 100644 --- a/spec/lib/mastodon/cli/emoji_spec.rb +++ b/spec/lib/mastodon/cli/emoji_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/emoji' -describe Mastodon::CLI::Emoji do +RSpec.describe Mastodon::CLI::Emoji do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/feeds_spec.rb b/spec/lib/mastodon/cli/feeds_spec.rb index 420cb3d587..75a8cb3ebc 100644 --- a/spec/lib/mastodon/cli/feeds_spec.rb +++ b/spec/lib/mastodon/cli/feeds_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/feeds' -describe Mastodon::CLI::Feeds do +RSpec.describe Mastodon::CLI::Feeds do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/ip_blocks_spec.rb b/spec/lib/mastodon/cli/ip_blocks_spec.rb index d44b1b9fe4..68d6b19859 100644 --- a/spec/lib/mastodon/cli/ip_blocks_spec.rb +++ b/spec/lib/mastodon/cli/ip_blocks_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/ip_blocks' -describe Mastodon::CLI::IpBlocks do +RSpec.describe Mastodon::CLI::IpBlocks do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/main_spec.rb b/spec/lib/mastodon/cli/main_spec.rb index 99d770a81d..a63b798683 100644 --- a/spec/lib/mastodon/cli/main_spec.rb +++ b/spec/lib/mastodon/cli/main_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/main' -describe Mastodon::CLI::Main do +RSpec.describe Mastodon::CLI::Main do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/maintenance_spec.rb b/spec/lib/mastodon/cli/maintenance_spec.rb index cde25d39ed..6a15677f43 100644 --- a/spec/lib/mastodon/cli/maintenance_spec.rb +++ b/spec/lib/mastodon/cli/maintenance_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/maintenance' -describe Mastodon::CLI::Maintenance do +RSpec.describe Mastodon::CLI::Maintenance do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/media_spec.rb b/spec/lib/mastodon/cli/media_spec.rb index ecc7101b6c..fa7a3161d0 100644 --- a/spec/lib/mastodon/cli/media_spec.rb +++ b/spec/lib/mastodon/cli/media_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/media' -describe Mastodon::CLI::Media do +RSpec.describe Mastodon::CLI::Media do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/preview_cards_spec.rb b/spec/lib/mastodon/cli/preview_cards_spec.rb index 951ae3758f..949787a759 100644 --- a/spec/lib/mastodon/cli/preview_cards_spec.rb +++ b/spec/lib/mastodon/cli/preview_cards_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/preview_cards' -describe Mastodon::CLI::PreviewCards do +RSpec.describe Mastodon::CLI::PreviewCards do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/search_spec.rb b/spec/lib/mastodon/cli/search_spec.rb index ed3789c3e7..8a6c2492aa 100644 --- a/spec/lib/mastodon/cli/search_spec.rb +++ b/spec/lib/mastodon/cli/search_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/search' -describe Mastodon::CLI::Search do +RSpec.describe Mastodon::CLI::Search do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/settings_spec.rb b/spec/lib/mastodon/cli/settings_spec.rb index e1b353eb90..5565b798ef 100644 --- a/spec/lib/mastodon/cli/settings_spec.rb +++ b/spec/lib/mastodon/cli/settings_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/settings' -describe Mastodon::CLI::Settings do +RSpec.describe Mastodon::CLI::Settings do it_behaves_like 'CLI Command' describe 'subcommand "registrations"' do diff --git a/spec/lib/mastodon/cli/statuses_spec.rb b/spec/lib/mastodon/cli/statuses_spec.rb index 161b7c02bb..2597ad7f27 100644 --- a/spec/lib/mastodon/cli/statuses_spec.rb +++ b/spec/lib/mastodon/cli/statuses_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/statuses' -describe Mastodon::CLI::Statuses do +RSpec.describe Mastodon::CLI::Statuses do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/cli/upgrade_spec.rb b/spec/lib/mastodon/cli/upgrade_spec.rb index 6861e04887..6861e1a068 100644 --- a/spec/lib/mastodon/cli/upgrade_spec.rb +++ b/spec/lib/mastodon/cli/upgrade_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/cli/upgrade' -describe Mastodon::CLI::Upgrade do +RSpec.describe Mastodon::CLI::Upgrade do subject { cli.invoke(action, arguments, options) } let(:cli) { described_class.new } diff --git a/spec/lib/mastodon/migration_warning_spec.rb b/spec/lib/mastodon/migration_warning_spec.rb index 4adf0837ab..d796d1e902 100644 --- a/spec/lib/mastodon/migration_warning_spec.rb +++ b/spec/lib/mastodon/migration_warning_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'mastodon/migration_warning' -describe Mastodon::MigrationWarning do +RSpec.describe Mastodon::MigrationWarning do describe 'migration_duration_warning' do before do allow(migration).to receive(:valid_environment?).and_return(true) diff --git a/spec/lib/ostatus/tag_manager_spec.rb b/spec/lib/ostatus/tag_manager_spec.rb index 0e20f26c7c..f808b96289 100644 --- a/spec/lib/ostatus/tag_manager_spec.rb +++ b/spec/lib/ostatus/tag_manager_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe OStatus::TagManager do +RSpec.describe OStatus::TagManager do describe '#unique_tag' do it 'returns a unique tag' do expect(described_class.instance.unique_tag(Time.utc(2000), 12, 'Status')).to eq 'tag:cb6e6126.ngrok.io,2000-01-01:objectId=12:objectType=Status' diff --git a/spec/lib/paperclip/response_with_limit_adapter_spec.rb b/spec/lib/paperclip/response_with_limit_adapter_spec.rb index baf8bf5bb7..3db52ffa0d 100644 --- a/spec/lib/paperclip/response_with_limit_adapter_spec.rb +++ b/spec/lib/paperclip/response_with_limit_adapter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Paperclip::ResponseWithLimitAdapter do +RSpec.describe Paperclip::ResponseWithLimitAdapter do subject { described_class.new(response_with_limit) } before { stub_request(:get, url).to_return(headers: headers, body: body) } diff --git a/spec/lib/permalink_redirector_spec.rb b/spec/lib/permalink_redirector_spec.rb index a009136561..3f77d7665a 100644 --- a/spec/lib/permalink_redirector_spec.rb +++ b/spec/lib/permalink_redirector_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PermalinkRedirector do +RSpec.describe PermalinkRedirector do let(:remote_account) { Fabricate(:account, username: 'alice', domain: 'example.com', url: 'https://example.com/@alice', id: 2) } describe '#redirect_url' do diff --git a/spec/lib/request_pool_spec.rb b/spec/lib/request_pool_spec.rb index a82eb5a188..2e8c785de8 100644 --- a/spec/lib/request_pool_spec.rb +++ b/spec/lib/request_pool_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RequestPool do +RSpec.describe RequestPool do subject { described_class.new } describe '#with' do diff --git a/spec/lib/request_spec.rb b/spec/lib/request_spec.rb index c99f18838b..c600a48ee2 100644 --- a/spec/lib/request_spec.rb +++ b/spec/lib/request_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'securerandom' -describe Request do +RSpec.describe Request do subject { described_class.new(:get, 'http://example.com') } describe '#headers' do diff --git a/spec/lib/sanitize/config_spec.rb b/spec/lib/sanitize/config_spec.rb index fe0b272c0a..17b78a95f6 100644 --- a/spec/lib/sanitize/config_spec.rb +++ b/spec/lib/sanitize/config_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Sanitize::Config do +RSpec.describe Sanitize::Config do describe '::MASTODON_STRICT' do subject { described_class::MASTODON_STRICT } diff --git a/spec/lib/scope_transformer_spec.rb b/spec/lib/scope_transformer_spec.rb index 7bc226e94f..09a31e04c5 100644 --- a/spec/lib/scope_transformer_spec.rb +++ b/spec/lib/scope_transformer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ScopeTransformer do +RSpec.describe ScopeTransformer do describe '#apply' do subject { described_class.new.apply(ScopeParser.new.parse(input)) } diff --git a/spec/lib/search_query_parser_spec.rb b/spec/lib/search_query_parser_spec.rb index 66b0e8f9e2..22149b3402 100644 --- a/spec/lib/search_query_parser_spec.rb +++ b/spec/lib/search_query_parser_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'parslet/rig/rspec' -describe SearchQueryParser do +RSpec.describe SearchQueryParser do let(:parser) { described_class.new } context 'with term' do diff --git a/spec/lib/search_query_transformer_spec.rb b/spec/lib/search_query_transformer_spec.rb index 5817e3d1d2..00220f84fd 100644 --- a/spec/lib/search_query_transformer_spec.rb +++ b/spec/lib/search_query_transformer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe SearchQueryTransformer do +RSpec.describe SearchQueryTransformer do subject { described_class.new.apply(parser, current_account: account) } let(:account) { Fabricate(:account) } diff --git a/spec/lib/status_cache_hydrator_spec.rb b/spec/lib/status_cache_hydrator_spec.rb index 5b80ccb970..958e2f62d7 100644 --- a/spec/lib/status_cache_hydrator_spec.rb +++ b/spec/lib/status_cache_hydrator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusCacheHydrator do +RSpec.describe StatusCacheHydrator do let(:status) { Fabricate(:status) } let(:account) { Fabricate(:account) } diff --git a/spec/lib/status_filter_spec.rb b/spec/lib/status_filter_spec.rb index cf6f3c7959..16c2e84f22 100644 --- a/spec/lib/status_filter_spec.rb +++ b/spec/lib/status_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusFilter do +RSpec.describe StatusFilter do describe '#filtered?' do let(:status) { Fabricate(:status) } diff --git a/spec/lib/status_finder_spec.rb b/spec/lib/status_finder_spec.rb index 53f5039af9..4d1c27afff 100644 --- a/spec/lib/status_finder_spec.rb +++ b/spec/lib/status_finder_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusFinder do +RSpec.describe StatusFinder do include RoutingHelper describe '#status' do diff --git a/spec/lib/status_reach_finder_spec.rb b/spec/lib/status_reach_finder_spec.rb index 7181717dc1..c045980ea9 100644 --- a/spec/lib/status_reach_finder_spec.rb +++ b/spec/lib/status_reach_finder_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusReachFinder do +RSpec.describe StatusReachFinder do describe '#inboxes' do context 'with a local status' do subject { described_class.new(status) } diff --git a/spec/lib/webfinger_resource_spec.rb b/spec/lib/webfinger_resource_spec.rb index 442f91aad0..0b86b41c48 100644 --- a/spec/lib/webfinger_resource_spec.rb +++ b/spec/lib/webfinger_resource_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe WebfingerResource do +RSpec.describe WebfingerResource do around do |example| before_local = Rails.configuration.x.local_domain before_web = Rails.configuration.x.web_domain diff --git a/spec/lib/webhooks/payload_renderer_spec.rb b/spec/lib/webhooks/payload_renderer_spec.rb index 074847c74c..0623edd254 100644 --- a/spec/lib/webhooks/payload_renderer_spec.rb +++ b/spec/lib/webhooks/payload_renderer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Webhooks::PayloadRenderer do +RSpec.describe Webhooks::PayloadRenderer do subject(:renderer) { described_class.new(json) } let(:event) { Webhooks::EventPresenter.new(type, object) } diff --git a/spec/locales/i18n_spec.rb b/spec/locales/i18n_spec.rb index cfce8e2234..8facf6612c 100644 --- a/spec/locales/i18n_spec.rb +++ b/spec/locales/i18n_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'I18n' do +RSpec.describe 'I18n' do describe 'Pluralizing locale translations' do subject { I18n.t('generic.validation_errors', count: 1) } diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index 5a8c293740..0257465817 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UserMailer do +RSpec.describe UserMailer do let(:receiver) { Fabricate(:user) } describe '#confirmation_instructions' do diff --git a/spec/models/account_filter_spec.rb b/spec/models/account_filter_spec.rb index fa47b5954a..5cb7fa92d4 100644 --- a/spec/models/account_filter_spec.rb +++ b/spec/models/account_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountFilter do +RSpec.describe AccountFilter do describe 'with empty params' do it 'excludes instance actor by default' do filter = described_class.new({}) diff --git a/spec/models/account_warning_preset_spec.rb b/spec/models/account_warning_preset_spec.rb index f171df7c97..e7a9855175 100644 --- a/spec/models/account_warning_preset_spec.rb +++ b/spec/models/account_warning_preset_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountWarningPreset do +RSpec.describe AccountWarningPreset do describe 'alphabetical' do let(:first) { Fabricate(:account_warning_preset, title: 'aaa', text: 'aaa') } let(:second) { Fabricate(:account_warning_preset, title: 'bbb', text: 'aaa') } diff --git a/spec/models/admin/appeal_filter_spec.rb b/spec/models/admin/appeal_filter_spec.rb index e840bc3bc1..8303e58ad6 100644 --- a/spec/models/admin/appeal_filter_spec.rb +++ b/spec/models/admin/appeal_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::AppealFilter do +RSpec.describe Admin::AppealFilter do describe '#results' do let(:approved_appeal) { Fabricate(:appeal, approved_at: 10.days.ago) } let(:not_approved_appeal) { Fabricate(:appeal, approved_at: nil) } diff --git a/spec/models/admin/tag_filter_spec.rb b/spec/models/admin/tag_filter_spec.rb index 21dc28affb..1baae117b8 100644 --- a/spec/models/admin/tag_filter_spec.rb +++ b/spec/models/admin/tag_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::TagFilter do +RSpec.describe Admin::TagFilter do describe 'with invalid params' do it 'raises with key error' do filter = described_class.new(wrong: true) diff --git a/spec/models/announcement_spec.rb b/spec/models/announcement_spec.rb index 1e7283ca77..e3865e6fc7 100644 --- a/spec/models/announcement_spec.rb +++ b/spec/models/announcement_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Announcement do +RSpec.describe Announcement do describe 'Scopes' do context 'with published and unpublished records' do let!(:published) { Fabricate(:announcement, published: true) } diff --git a/spec/models/appeal_spec.rb b/spec/models/appeal_spec.rb index 13ca3a2d90..7e324582ed 100644 --- a/spec/models/appeal_spec.rb +++ b/spec/models/appeal_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Appeal do +RSpec.describe Appeal do describe 'Validations' do it 'validates text length is under limit' do appeal = Fabricate.build( diff --git a/spec/models/concerns/account/counters_spec.rb b/spec/models/concerns/account/counters_spec.rb index ccac9e95de..bbbaa7d06c 100644 --- a/spec/models/concerns/account/counters_spec.rb +++ b/spec/models/concerns/account/counters_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::Counters do +RSpec.describe Account::Counters do let!(:account) { Fabricate(:account) } describe '#increment_count!' do diff --git a/spec/models/concerns/account/finder_concern_spec.rb b/spec/models/concerns/account/finder_concern_spec.rb index ab5149e987..b3fae56dfc 100644 --- a/spec/models/concerns/account/finder_concern_spec.rb +++ b/spec/models/concerns/account/finder_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::FinderConcern do +RSpec.describe Account::FinderConcern do describe 'local finders' do let!(:account) { Fabricate(:account, username: 'Alice') } diff --git a/spec/models/concerns/account/interactions_spec.rb b/spec/models/concerns/account/interactions_spec.rb index 3f2c601f38..4868054df7 100644 --- a/spec/models/concerns/account/interactions_spec.rb +++ b/spec/models/concerns/account/interactions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::Interactions do +RSpec.describe Account::Interactions do let(:account) { Fabricate(:account, username: 'account') } let(:account_id) { account.id } let(:account_ids) { [account_id] } diff --git a/spec/models/concerns/account/statuses_search_spec.rb b/spec/models/concerns/account/statuses_search_spec.rb index ab249d62d0..9488d42021 100644 --- a/spec/models/concerns/account/statuses_search_spec.rb +++ b/spec/models/concerns/account/statuses_search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::StatusesSearch do +RSpec.describe Account::StatusesSearch do let(:account) { Fabricate(:account, indexable: indexable) } before do diff --git a/spec/models/concerns/status/threading_concern_spec.rb b/spec/models/concerns/status/threading_concern_spec.rb index 09fb218566..a13487c10a 100644 --- a/spec/models/concerns/status/threading_concern_spec.rb +++ b/spec/models/concerns/status/threading_concern_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Status::ThreadingConcern do +RSpec.describe Status::ThreadingConcern do describe '#ancestors' do let!(:alice) { Fabricate(:account, username: 'alice') } let!(:bob) { Fabricate(:account, username: 'bob', domain: 'example.com') } diff --git a/spec/models/custom_emoji_category_spec.rb b/spec/models/custom_emoji_category_spec.rb index 30de07bd81..3da77344e2 100644 --- a/spec/models/custom_emoji_category_spec.rb +++ b/spec/models/custom_emoji_category_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe CustomEmojiCategory do +RSpec.describe CustomEmojiCategory do describe 'validations' do it 'validates name presence' do record = described_class.new(name: nil) diff --git a/spec/models/domain_allow_spec.rb b/spec/models/domain_allow_spec.rb index 12504211a1..92f1ef8ccf 100644 --- a/spec/models/domain_allow_spec.rb +++ b/spec/models/domain_allow_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DomainAllow do +RSpec.describe DomainAllow do describe 'Validations' do it 'is invalid without a domain' do domain_allow = Fabricate.build(:domain_allow, domain: nil) diff --git a/spec/models/export_spec.rb b/spec/models/export_spec.rb index 75468898d2..06bf07ed78 100644 --- a/spec/models/export_spec.rb +++ b/spec/models/export_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Export do +RSpec.describe Export do let(:account) { Fabricate(:account) } let(:target_accounts) do [{}, { username: 'one', domain: 'local.host' }].map(&method(:Fabricate).curry(2).call(:account)) diff --git a/spec/models/extended_description_spec.rb b/spec/models/extended_description_spec.rb index ecc27c0f6d..368ca33f5b 100644 --- a/spec/models/extended_description_spec.rb +++ b/spec/models/extended_description_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ExtendedDescription do +RSpec.describe ExtendedDescription do describe '.current' do context 'with the default values' do it 'makes a new instance' do diff --git a/spec/models/form/admin_settings_spec.rb b/spec/models/form/admin_settings_spec.rb index 0dc2d881ad..6080b9e081 100644 --- a/spec/models/form/admin_settings_spec.rb +++ b/spec/models/form/admin_settings_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Form::AdminSettings do +RSpec.describe Form::AdminSettings do describe 'validations' do describe 'site_contact_username' do context 'with no accounts' do diff --git a/spec/models/form/custom_emoji_batch_spec.rb b/spec/models/form/custom_emoji_batch_spec.rb index abeada5d50..180c6abd23 100644 --- a/spec/models/form/custom_emoji_batch_spec.rb +++ b/spec/models/form/custom_emoji_batch_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Form::CustomEmojiBatch do +RSpec.describe Form::CustomEmojiBatch do describe '#save' do subject { described_class.new({ current_account: account }.merge(options)) } diff --git a/spec/models/form/status_filter_batch_action_spec.rb b/spec/models/form/status_filter_batch_action_spec.rb index f06a11cc8b..8ea9d7545e 100644 --- a/spec/models/form/status_filter_batch_action_spec.rb +++ b/spec/models/form/status_filter_batch_action_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Form::StatusFilterBatchAction do +RSpec.describe Form::StatusFilterBatchAction do describe '#save!' do it 'does nothing if status_filter_ids is empty' do batch_action = described_class.new(status_filter_ids: []) diff --git a/spec/models/ip_block_spec.rb b/spec/models/ip_block_spec.rb index 290b99b288..6f1eb38425 100644 --- a/spec/models/ip_block_spec.rb +++ b/spec/models/ip_block_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe IpBlock do +RSpec.describe IpBlock do describe 'validations' do it 'validates ip presence', :aggregate_failures do ip_block = described_class.new(ip: nil, severity: :no_access) diff --git a/spec/models/marker_spec.rb b/spec/models/marker_spec.rb index 51dd584388..8339f8e259 100644 --- a/spec/models/marker_spec.rb +++ b/spec/models/marker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Marker do +RSpec.describe Marker do describe 'validations' do describe 'timeline' do it 'must be included in valid list' do diff --git a/spec/models/one_time_key_spec.rb b/spec/models/one_time_key_spec.rb index 6ff7ffc5c1..17fcdf3788 100644 --- a/spec/models/one_time_key_spec.rb +++ b/spec/models/one_time_key_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe OneTimeKey do +RSpec.describe OneTimeKey do describe 'validations' do context 'with an invalid signature' do let(:one_time_key) { Fabricate.build(:one_time_key, signature: 'wrong!') } diff --git a/spec/models/poll_spec.rb b/spec/models/poll_spec.rb index ebcc459078..740ef63d81 100644 --- a/spec/models/poll_spec.rb +++ b/spec/models/poll_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Poll do +RSpec.describe Poll do describe 'scopes' do let(:status) { Fabricate(:status) } let(:attached_poll) { Fabricate(:poll, status: status) } diff --git a/spec/models/preview_card_provider_spec.rb b/spec/models/preview_card_provider_spec.rb index 8b18b3d2b7..12bca83440 100644 --- a/spec/models/preview_card_provider_spec.rb +++ b/spec/models/preview_card_provider_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PreviewCardProvider do +RSpec.describe PreviewCardProvider do include_examples 'Reviewable' describe 'scopes' do diff --git a/spec/models/preview_card_spec.rb b/spec/models/preview_card_spec.rb index a17c7532e9..2f0ea38ee4 100644 --- a/spec/models/preview_card_spec.rb +++ b/spec/models/preview_card_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PreviewCard do +RSpec.describe PreviewCard do describe 'validations' do describe 'urls' do it 'allows http schemes' do diff --git a/spec/models/privacy_policy_spec.rb b/spec/models/privacy_policy_spec.rb index 03bbe7264b..742cac8e18 100644 --- a/spec/models/privacy_policy_spec.rb +++ b/spec/models/privacy_policy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PrivacyPolicy do +RSpec.describe PrivacyPolicy do describe '.current' do context 'with the default values' do it 'has the privacy text' do diff --git a/spec/models/relationship_filter_spec.rb b/spec/models/relationship_filter_spec.rb index fccd42aaad..b56da91f8d 100644 --- a/spec/models/relationship_filter_spec.rb +++ b/spec/models/relationship_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RelationshipFilter do +RSpec.describe RelationshipFilter do let(:account) { Fabricate(:account) } describe '#results' do diff --git a/spec/models/report_filter_spec.rb b/spec/models/report_filter_spec.rb index 6baf0ea421..8668eb3d10 100644 --- a/spec/models/report_filter_spec.rb +++ b/spec/models/report_filter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ReportFilter do +RSpec.describe ReportFilter do describe 'with empty params' do it 'defaults to unresolved reports list' do filter = described_class.new({}) diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb index d01d37bd8b..a0e4f6fafd 100644 --- a/spec/models/report_spec.rb +++ b/spec/models/report_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Report do +RSpec.describe Report do describe 'statuses' do it 'returns the statuses for the report' do status = Fabricate(:status) diff --git a/spec/models/rule_spec.rb b/spec/models/rule_spec.rb index c9b9c55028..375483e0db 100644 --- a/spec/models/rule_spec.rb +++ b/spec/models/rule_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Rule do +RSpec.describe Rule do describe 'scopes' do describe 'ordered' do let(:deleted_rule) { Fabricate(:rule, deleted_at: 10.days.ago) } diff --git a/spec/models/status_edit_spec.rb b/spec/models/status_edit_spec.rb index 2d33514522..7a469b44dc 100644 --- a/spec/models/status_edit_spec.rb +++ b/spec/models/status_edit_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusEdit do +RSpec.describe StatusEdit do describe '#reblog?' do it 'returns false' do record = described_class.new diff --git a/spec/models/tag_feed_spec.rb b/spec/models/tag_feed_spec.rb index 61b8d8d824..578fc78238 100644 --- a/spec/models/tag_feed_spec.rb +++ b/spec/models/tag_feed_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe TagFeed do +RSpec.describe TagFeed do describe '#get' do let(:account) { Fabricate(:account) } let(:tag_cats) { Fabricate(:tag, name: 'cats') } diff --git a/spec/policies/account_warning_preset_policy_spec.rb b/spec/policies/account_warning_preset_policy_spec.rb index 63bf33de24..53e224f19f 100644 --- a/spec/policies/account_warning_preset_policy_spec.rb +++ b/spec/policies/account_warning_preset_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe AccountWarningPresetPolicy do +RSpec.describe AccountWarningPresetPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/admin/status_policy_spec.rb b/spec/policies/admin/status_policy_spec.rb index af9f7716be..07af425516 100644 --- a/spec/policies/admin/status_policy_spec.rb +++ b/spec/policies/admin/status_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe Admin::StatusPolicy do +RSpec.describe Admin::StatusPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/announcement_policy_spec.rb b/spec/policies/announcement_policy_spec.rb index 3d230b3cb4..503ffca6dc 100644 --- a/spec/policies/announcement_policy_spec.rb +++ b/spec/policies/announcement_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe AnnouncementPolicy do +RSpec.describe AnnouncementPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/appeal_policy_spec.rb b/spec/policies/appeal_policy_spec.rb index d7498eb9f0..1bf8ce0a0d 100644 --- a/spec/policies/appeal_policy_spec.rb +++ b/spec/policies/appeal_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe AppealPolicy do +RSpec.describe AppealPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/canonical_email_block_policy_spec.rb b/spec/policies/canonical_email_block_policy_spec.rb index 0e55febfa9..f5029d9e6b 100644 --- a/spec/policies/canonical_email_block_policy_spec.rb +++ b/spec/policies/canonical_email_block_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe CanonicalEmailBlockPolicy do +RSpec.describe CanonicalEmailBlockPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/delivery_policy_spec.rb b/spec/policies/delivery_policy_spec.rb index fbcbf390d7..bb82389eec 100644 --- a/spec/policies/delivery_policy_spec.rb +++ b/spec/policies/delivery_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe DeliveryPolicy do +RSpec.describe DeliveryPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/follow_recommendation_policy_spec.rb b/spec/policies/follow_recommendation_policy_spec.rb index 01f4da0be2..ae74d5c3a8 100644 --- a/spec/policies/follow_recommendation_policy_spec.rb +++ b/spec/policies/follow_recommendation_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe FollowRecommendationPolicy do +RSpec.describe FollowRecommendationPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/ip_block_policy_spec.rb b/spec/policies/ip_block_policy_spec.rb index 3cfa85863c..97bc239e9a 100644 --- a/spec/policies/ip_block_policy_spec.rb +++ b/spec/policies/ip_block_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe IpBlockPolicy do +RSpec.describe IpBlockPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/preview_card_policy_spec.rb b/spec/policies/preview_card_policy_spec.rb index d6675c5b34..a1944303e1 100644 --- a/spec/policies/preview_card_policy_spec.rb +++ b/spec/policies/preview_card_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe PreviewCardPolicy do +RSpec.describe PreviewCardPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/preview_card_provider_policy_spec.rb b/spec/policies/preview_card_provider_policy_spec.rb index 8d3715de95..676039a1b7 100644 --- a/spec/policies/preview_card_provider_policy_spec.rb +++ b/spec/policies/preview_card_provider_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe PreviewCardProviderPolicy do +RSpec.describe PreviewCardProviderPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/rule_policy_spec.rb b/spec/policies/rule_policy_spec.rb index 0e45f6df02..5d435e38c1 100644 --- a/spec/policies/rule_policy_spec.rb +++ b/spec/policies/rule_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe RulePolicy do +RSpec.describe RulePolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/policies/webhook_policy_spec.rb b/spec/policies/webhook_policy_spec.rb index 909311461a..96aaae2c30 100644 --- a/spec/policies/webhook_policy_spec.rb +++ b/spec/policies/webhook_policy_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' require 'pundit/rspec' -describe WebhookPolicy do +RSpec.describe WebhookPolicy do let(:policy) { described_class } let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } let(:john) { Fabricate(:account) } diff --git a/spec/presenters/instance_presenter_spec.rb b/spec/presenters/instance_presenter_spec.rb index 516c7e9896..42f5200f3a 100644 --- a/spec/presenters/instance_presenter_spec.rb +++ b/spec/presenters/instance_presenter_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe InstancePresenter do +RSpec.describe InstancePresenter do let(:instance_presenter) { described_class.new } describe '#description' do diff --git a/spec/requests/account_show_page_spec.rb b/spec/requests/account_show_page_spec.rb index bdcec12fdb..d0857c8980 100644 --- a/spec/requests/account_show_page_spec.rb +++ b/spec/requests/account_show_page_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The account show page' do +RSpec.describe 'The account show page' do it 'has valid opengraph tags' do alice = Fabricate(:account, username: 'alice', display_name: 'Alice') _status = Fabricate(:status, account: alice, text: 'Hello World') diff --git a/spec/requests/accounts_spec.rb b/spec/requests/accounts_spec.rb index 238524c75c..d53816eff0 100644 --- a/spec/requests/accounts_spec.rb +++ b/spec/requests/accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts show response' do +RSpec.describe 'Accounts show response' do let(:account) { Fabricate(:account) } context 'with an unapproved account' do diff --git a/spec/requests/anonymous_cookies_spec.rb b/spec/requests/anonymous_cookies_spec.rb index 337ed4ec31..235dd46a63 100644 --- a/spec/requests/anonymous_cookies_spec.rb +++ b/spec/requests/anonymous_cookies_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Anonymous visits' do +RSpec.describe 'Anonymous visits' do around do |example| old = ActionController::Base.allow_forgery_protection ActionController::Base.allow_forgery_protection = true diff --git a/spec/requests/api/v1/accounts/familiar_followers_spec.rb b/spec/requests/api/v1/accounts/familiar_followers_spec.rb index fdc0a3a932..475f1b17e4 100644 --- a/spec/requests/api/v1/accounts/familiar_followers_spec.rb +++ b/spec/requests/api/v1/accounts/familiar_followers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Familiar Followers API' do +RSpec.describe 'Accounts Familiar Followers API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:follows' } diff --git a/spec/requests/api/v1/accounts/follower_accounts_spec.rb b/spec/requests/api/v1/accounts/follower_accounts_spec.rb index 7ff92d6a48..400b1c7aff 100644 --- a/spec/requests/api/v1/accounts/follower_accounts_spec.rb +++ b/spec/requests/api/v1/accounts/follower_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Accounts FollowerAccounts' do +RSpec.describe 'API V1 Accounts FollowerAccounts' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/following_accounts_spec.rb b/spec/requests/api/v1/accounts/following_accounts_spec.rb index b343a48654..b0bb5141ca 100644 --- a/spec/requests/api/v1/accounts/following_accounts_spec.rb +++ b/spec/requests/api/v1/accounts/following_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Accounts FollowingAccounts' do +RSpec.describe 'API V1 Accounts FollowingAccounts' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/identity_proofs_spec.rb b/spec/requests/api/v1/accounts/identity_proofs_spec.rb index 3727af7e89..d1d9db8e73 100644 --- a/spec/requests/api/v1/accounts/identity_proofs_spec.rb +++ b/spec/requests/api/v1/accounts/identity_proofs_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Identity Proofs API' do +RSpec.describe 'Accounts Identity Proofs API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/lists_spec.rb b/spec/requests/api/v1/accounts/lists_spec.rb index 48c0337e54..8b04f07f65 100644 --- a/spec/requests/api/v1/accounts/lists_spec.rb +++ b/spec/requests/api/v1/accounts/lists_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Lists API' do +RSpec.describe 'Accounts Lists API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:lists' } diff --git a/spec/requests/api/v1/accounts/lookup_spec.rb b/spec/requests/api/v1/accounts/lookup_spec.rb index 4c022c7c13..dfd9fad49d 100644 --- a/spec/requests/api/v1/accounts/lookup_spec.rb +++ b/spec/requests/api/v1/accounts/lookup_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Lookup API' do +RSpec.describe 'Accounts Lookup API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/notes_spec.rb b/spec/requests/api/v1/accounts/notes_spec.rb index 4f3ac68c74..b8c493abcc 100644 --- a/spec/requests/api/v1/accounts/notes_spec.rb +++ b/spec/requests/api/v1/accounts/notes_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Notes API' do +RSpec.describe 'Accounts Notes API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:accounts' } diff --git a/spec/requests/api/v1/accounts/pins_spec.rb b/spec/requests/api/v1/accounts/pins_spec.rb index c293715f7e..c66b80c7fd 100644 --- a/spec/requests/api/v1/accounts/pins_spec.rb +++ b/spec/requests/api/v1/accounts/pins_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Pins API' do +RSpec.describe 'Accounts Pins API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:accounts' } diff --git a/spec/requests/api/v1/accounts/relationships_spec.rb b/spec/requests/api/v1/accounts/relationships_spec.rb index b06ce0509d..76b1830bbe 100644 --- a/spec/requests/api/v1/accounts/relationships_spec.rb +++ b/spec/requests/api/v1/accounts/relationships_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'GET /api/v1/accounts/relationships' do +RSpec.describe 'GET /api/v1/accounts/relationships' do subject do get '/api/v1/accounts/relationships', headers: headers, params: params end diff --git a/spec/requests/api/v1/accounts/search_spec.rb b/spec/requests/api/v1/accounts/search_spec.rb index 76b32e7b2c..f6ab7a8531 100644 --- a/spec/requests/api/v1/accounts/search_spec.rb +++ b/spec/requests/api/v1/accounts/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Accounts Search API' do +RSpec.describe 'Accounts Search API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/accounts/statuses_spec.rb b/spec/requests/api/v1/accounts/statuses_spec.rb index 97cdbe0156..4a4d9383db 100644 --- a/spec/requests/api/v1/accounts/statuses_spec.rb +++ b/spec/requests/api/v1/accounts/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Accounts Statuses' do +RSpec.describe 'API V1 Accounts Statuses' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/accounts_spec.rb b/spec/requests/api/v1/accounts_spec.rb index 3432106a46..e31644352b 100644 --- a/spec/requests/api/v1/accounts_spec.rb +++ b/spec/requests/api/v1/accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe '/api/v1/accounts' do +RSpec.describe '/api/v1/accounts' do let(:user) { Fabricate(:user) } let(:scopes) { '' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/admin/dimensions_spec.rb b/spec/requests/api/v1/admin/dimensions_spec.rb index 87534a74b8..43e2db00c5 100644 --- a/spec/requests/api/v1/admin/dimensions_spec.rb +++ b/spec/requests/api/v1/admin/dimensions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin Dimensions' do +RSpec.describe 'Admin Dimensions' do let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/admin/measures_spec.rb b/spec/requests/api/v1/admin/measures_spec.rb index 80fed79d9a..56a2c1eaee 100644 --- a/spec/requests/api/v1/admin/measures_spec.rb +++ b/spec/requests/api/v1/admin/measures_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin Measures' do +RSpec.describe 'Admin Measures' do let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/admin/retention_spec.rb b/spec/requests/api/v1/admin/retention_spec.rb index 9178335ba5..138959a0ab 100644 --- a/spec/requests/api/v1/admin/retention_spec.rb +++ b/spec/requests/api/v1/admin/retention_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin Retention' do +RSpec.describe 'Admin Retention' do let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/admin/trends/links/links_spec.rb b/spec/requests/api/v1/admin/trends/links/links_spec.rb index 48842828b3..082af785ab 100644 --- a/spec/requests/api/v1/admin/trends/links/links_spec.rb +++ b/spec/requests/api/v1/admin/trends/links/links_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Links' do +RSpec.describe 'Links' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb b/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb index 384a305d4a..193906ab05 100644 --- a/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb +++ b/spec/requests/api/v1/admin/trends/links/preview_card_providers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Admin Trends Links Preview Card Providers' do +RSpec.describe 'API V1 Admin Trends Links Preview Card Providers' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/admin/trends/statuses_spec.rb b/spec/requests/api/v1/admin/trends/statuses_spec.rb index 04aa0465f2..e33a9658a9 100644 --- a/spec/requests/api/v1/admin/trends/statuses_spec.rb +++ b/spec/requests/api/v1/admin/trends/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Admin Trends Statuses' do +RSpec.describe 'API V1 Admin Trends Statuses' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/admin/trends/tags_spec.rb b/spec/requests/api/v1/admin/trends/tags_spec.rb index b1437dad8d..748a27283c 100644 --- a/spec/requests/api/v1/admin/trends/tags_spec.rb +++ b/spec/requests/api/v1/admin/trends/tags_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Admin Trends Tags' do +RSpec.describe 'API V1 Admin Trends Tags' do let(:role) { UserRole.find_by(name: 'Admin') } let(:user) { Fabricate(:user, role: role) } let(:scopes) { 'admin:read admin:write' } diff --git a/spec/requests/api/v1/annual_reports_spec.rb b/spec/requests/api/v1/annual_reports_spec.rb index 60cd8ed526..bab184787f 100644 --- a/spec/requests/api/v1/annual_reports_spec.rb +++ b/spec/requests/api/v1/annual_reports_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Annual Reports' do +RSpec.describe 'API V1 Annual Reports' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/apps/credentials_spec.rb b/spec/requests/api/v1/apps/credentials_spec.rb index 6e6970ce53..b899999640 100644 --- a/spec/requests/api/v1/apps/credentials_spec.rb +++ b/spec/requests/api/v1/apps/credentials_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Credentials' do +RSpec.describe 'Credentials' do describe 'GET /api/v1/apps/verify_credentials' do subject do get '/api/v1/apps/verify_credentials', headers: headers diff --git a/spec/requests/api/v1/csp_spec.rb b/spec/requests/api/v1/csp_spec.rb index 2db52ac725..5d61d7f3f5 100644 --- a/spec/requests/api/v1/csp_spec.rb +++ b/spec/requests/api/v1/csp_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API namespace minimal Content-Security-Policy' do +RSpec.describe 'API namespace minimal Content-Security-Policy' do before { stub_tests_controller } after { Rails.application.reload_routes! } diff --git a/spec/requests/api/v1/custom_emojis_spec.rb b/spec/requests/api/v1/custom_emojis_spec.rb index 2f0dc72944..798d8e29ed 100644 --- a/spec/requests/api/v1/custom_emojis_spec.rb +++ b/spec/requests/api/v1/custom_emojis_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Custom Emojis' do +RSpec.describe 'Custom Emojis' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/directories_spec.rb b/spec/requests/api/v1/directories_spec.rb index 0a1864d136..94306c06ec 100644 --- a/spec/requests/api/v1/directories_spec.rb +++ b/spec/requests/api/v1/directories_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Directories API' do +RSpec.describe 'Directories API' do let(:user) { Fabricate(:user, confirmed_at: nil) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:follows' } diff --git a/spec/requests/api/v1/endorsements_spec.rb b/spec/requests/api/v1/endorsements_spec.rb index e267f2abd2..255211a404 100644 --- a/spec/requests/api/v1/endorsements_spec.rb +++ b/spec/requests/api/v1/endorsements_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Endorsements' do +RSpec.describe 'Endorsements' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/featured_tags/suggestions_spec.rb b/spec/requests/api/v1/featured_tags/suggestions_spec.rb index 00451540ca..0a7bfe5cda 100644 --- a/spec/requests/api/v1/featured_tags/suggestions_spec.rb +++ b/spec/requests/api/v1/featured_tags/suggestions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Featured Tags Suggestions API' do +RSpec.describe 'Featured Tags Suggestions API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:accounts' } diff --git a/spec/requests/api/v1/instance_spec.rb b/spec/requests/api/v1/instance_spec.rb index 9cac280c4d..f0a4ceadb8 100644 --- a/spec/requests/api/v1/instance_spec.rb +++ b/spec/requests/api/v1/instance_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Instances' do +RSpec.describe 'Instances' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/instances/translation_languages_spec.rb b/spec/requests/api/v1/instances/translation_languages_spec.rb index 7cfb24e86f..e5a480c175 100644 --- a/spec/requests/api/v1/instances/translation_languages_spec.rb +++ b/spec/requests/api/v1/instances/translation_languages_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Translation Languages' do +RSpec.describe 'Translation Languages' do describe 'GET /api/v1/instances/translation_languages' do context 'when no translation service is configured' do it 'returns empty language matrix', :aggregate_failures do diff --git a/spec/requests/api/v1/peers/search_spec.rb b/spec/requests/api/v1/peers/search_spec.rb index dcdea387a5..87b0dc4f64 100644 --- a/spec/requests/api/v1/peers/search_spec.rb +++ b/spec/requests/api/v1/peers/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API Peers Search' do +RSpec.describe 'API Peers Search' do describe 'GET /api/v1/peers/search' do context 'when peers api is disabled' do before do diff --git a/spec/requests/api/v1/preferences_spec.rb b/spec/requests/api/v1/preferences_spec.rb index 6f4188c35a..6508b51c04 100644 --- a/spec/requests/api/v1/preferences_spec.rb +++ b/spec/requests/api/v1/preferences_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Preferences' do +RSpec.describe 'Preferences' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/push/subscriptions_spec.rb b/spec/requests/api/v1/push/subscriptions_spec.rb index 54ef5a13ad..6674b048e8 100644 --- a/spec/requests/api/v1/push/subscriptions_spec.rb +++ b/spec/requests/api/v1/push/subscriptions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Push Subscriptions' do +RSpec.describe 'API V1 Push Subscriptions' do let(:user) { Fabricate(:user) } let(:endpoint) { 'https://fcm.googleapis.com/fcm/send/fiuH06a27qE:APA91bHnSiGcLwdaxdyqVXNDR9w1NlztsHb6lyt5WDKOC_Z_Q8BlFxQoR8tWFSXUIDdkyw0EdvxTu63iqamSaqVSevW5LfoFwojws8XYDXv_NRRLH6vo2CdgiN4jgHv5VLt2A8ah6lUX' } let(:keys) do diff --git a/spec/requests/api/v1/scheduled_status_spec.rb b/spec/requests/api/v1/scheduled_status_spec.rb index f4612410bf..b35d297a60 100644 --- a/spec/requests/api/v1/scheduled_status_spec.rb +++ b/spec/requests/api/v1/scheduled_status_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Scheduled Statuses' do +RSpec.describe 'Scheduled Statuses' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v1/statuses/histories_spec.rb b/spec/requests/api/v1/statuses/histories_spec.rb index b3761ca688..f13bf79867 100644 --- a/spec/requests/api/v1/statuses/histories_spec.rb +++ b/spec/requests/api/v1/statuses/histories_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Histories' do +RSpec.describe 'API V1 Statuses Histories' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:statuses' } diff --git a/spec/requests/api/v1/statuses/mutes_spec.rb b/spec/requests/api/v1/statuses/mutes_spec.rb index 72fd7d9d11..69ae948852 100644 --- a/spec/requests/api/v1/statuses/mutes_spec.rb +++ b/spec/requests/api/v1/statuses/mutes_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Mutes' do +RSpec.describe 'API V1 Statuses Mutes' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:mutes' } diff --git a/spec/requests/api/v1/statuses/pins_spec.rb b/spec/requests/api/v1/statuses/pins_spec.rb index db07fa424f..3be1a16ee1 100644 --- a/spec/requests/api/v1/statuses/pins_spec.rb +++ b/spec/requests/api/v1/statuses/pins_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Pins' do +RSpec.describe 'Pins' do let(:user) { Fabricate(:user) } let(:scopes) { 'write:accounts' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/statuses/reblogs_spec.rb b/spec/requests/api/v1/statuses/reblogs_spec.rb index 77542d294e..0978c890a4 100644 --- a/spec/requests/api/v1/statuses/reblogs_spec.rb +++ b/spec/requests/api/v1/statuses/reblogs_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Reblogs' do +RSpec.describe 'API V1 Statuses Reblogs' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'write:statuses' } diff --git a/spec/requests/api/v1/statuses/translations_spec.rb b/spec/requests/api/v1/statuses/translations_spec.rb index e2ab5d0b80..047b2f0485 100644 --- a/spec/requests/api/v1/statuses/translations_spec.rb +++ b/spec/requests/api/v1/statuses/translations_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Statuses Translations' do +RSpec.describe 'API V1 Statuses Translations' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read:statuses' } diff --git a/spec/requests/api/v1/statuses_spec.rb b/spec/requests/api/v1/statuses_spec.rb index 3e91fcdd98..1a211d14d8 100644 --- a/spec/requests/api/v1/statuses_spec.rb +++ b/spec/requests/api/v1/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe '/api/v1/statuses' do +RSpec.describe '/api/v1/statuses' do context 'with an oauth token' do let(:user) { Fabricate(:user) } let(:client_app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } diff --git a/spec/requests/api/v1/streaming_spec.rb b/spec/requests/api/v1/streaming_spec.rb index 6ce35c2fe6..a1f64846cf 100644 --- a/spec/requests/api/v1/streaming_spec.rb +++ b/spec/requests/api/v1/streaming_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Streaming' do +RSpec.describe 'API V1 Streaming' do around do |example| before = Rails.configuration.x.streaming_api_base_url Rails.configuration.x.streaming_api_base_url = "wss://#{Rails.configuration.x.web_domain}" diff --git a/spec/requests/api/v1/timelines/home_spec.rb b/spec/requests/api/v1/timelines/home_spec.rb index 96bd153aff..d158e0801c 100644 --- a/spec/requests/api/v1/timelines/home_spec.rb +++ b/spec/requests/api/v1/timelines/home_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Home', :inline_jobs do +RSpec.describe 'Home', :inline_jobs do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/link_spec.rb b/spec/requests/api/v1/timelines/link_spec.rb index e1c914ab81..67d8bca022 100644 --- a/spec/requests/api/v1/timelines/link_spec.rb +++ b/spec/requests/api/v1/timelines/link_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Link' do +RSpec.describe 'Link' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/list_spec.rb b/spec/requests/api/v1/timelines/list_spec.rb index 98d2456745..753c784866 100644 --- a/spec/requests/api/v1/timelines/list_spec.rb +++ b/spec/requests/api/v1/timelines/list_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API V1 Timelines List' do +RSpec.describe 'API V1 Timelines List' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v1/timelines/public_spec.rb b/spec/requests/api/v1/timelines/public_spec.rb index 100f6c1bfc..1fc62b3932 100644 --- a/spec/requests/api/v1/timelines/public_spec.rb +++ b/spec/requests/api/v1/timelines/public_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Public' do +RSpec.describe 'Public' do let(:user) { Fabricate(:user) } let(:scopes) { 'read:statuses' } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v2/instance_spec.rb b/spec/requests/api/v2/instance_spec.rb index 2636970d6e..2f01db5003 100644 --- a/spec/requests/api/v2/instance_spec.rb +++ b/spec/requests/api/v2/instance_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Instances' do +RSpec.describe 'Instances' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } diff --git a/spec/requests/api/v2/search_spec.rb b/spec/requests/api/v2/search_spec.rb index 13bcf17984..039e7513cd 100644 --- a/spec/requests/api/v2/search_spec.rb +++ b/spec/requests/api/v2/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Search API' do +RSpec.describe 'Search API' do context 'with token' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } diff --git a/spec/requests/api/v2/suggestions_spec.rb b/spec/requests/api/v2/suggestions_spec.rb index a7d6a0864f..8895efd23d 100644 --- a/spec/requests/api/v2/suggestions_spec.rb +++ b/spec/requests/api/v2/suggestions_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Suggestions API' do +RSpec.describe 'Suggestions API' do let(:user) { Fabricate(:user) } let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } let(:scopes) { 'read' } diff --git a/spec/requests/backups_spec.rb b/spec/requests/backups_spec.rb index a6c2efe0db..a8c1124ed2 100644 --- a/spec/requests/backups_spec.rb +++ b/spec/requests/backups_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Backups' do +RSpec.describe 'Backups' do include RoutingHelper describe 'GET backups#download' do diff --git a/spec/requests/cache_spec.rb b/spec/requests/cache_spec.rb index 91e5b022e3..9cce241b38 100644 --- a/spec/requests/cache_spec.rb +++ b/spec/requests/cache_spec.rb @@ -118,7 +118,7 @@ module TestEndpoints end end -describe 'Caching behavior' do +RSpec.describe 'Caching behavior' do shared_examples 'cachable response' do |http_success: false| it 'does not set cookies or set public cache control', :aggregate_failures do expect(response.cookies).to be_empty diff --git a/spec/requests/catch_all_route_request_spec.rb b/spec/requests/catch_all_route_request_spec.rb index e600bedfe0..e7ea21524c 100644 --- a/spec/requests/catch_all_route_request_spec.rb +++ b/spec/requests/catch_all_route_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The catch all route' do +RSpec.describe 'The catch all route' do describe 'with a simple value' do it 'returns a 404 page as html' do get '/test' diff --git a/spec/requests/content_security_policy_spec.rb b/spec/requests/content_security_policy_spec.rb index ba6fe47741..7520ecb0db 100644 --- a/spec/requests/content_security_policy_spec.rb +++ b/spec/requests/content_security_policy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Content-Security-Policy' do +RSpec.describe 'Content-Security-Policy' do before { allow(SecureRandom).to receive(:base64).with(16).and_return('ZbA+JmE7+bK8F5qvADZHuQ==') } it 'sets the expected CSP headers' do diff --git a/spec/requests/custom_css_spec.rb b/spec/requests/custom_css_spec.rb index 5271ed4a5a..a46ebd7281 100644 --- a/spec/requests/custom_css_spec.rb +++ b/spec/requests/custom_css_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Custom CSS' do +RSpec.describe 'Custom CSS' do include RoutingHelper describe 'GET /custom.css' do diff --git a/spec/requests/custom_stylesheets_spec.rb b/spec/requests/custom_stylesheets_spec.rb index 128d173f3a..9c5c058344 100644 --- a/spec/requests/custom_stylesheets_spec.rb +++ b/spec/requests/custom_stylesheets_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Custom stylesheets' do +RSpec.describe 'Custom stylesheets' do describe 'GET /custom.css' do before { get '/custom.css' } diff --git a/spec/requests/disabled_oauth_endpoints_spec.rb b/spec/requests/disabled_oauth_endpoints_spec.rb index 7c2c09f380..279d2576a3 100644 --- a/spec/requests/disabled_oauth_endpoints_spec.rb +++ b/spec/requests/disabled_oauth_endpoints_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Disabled OAuth routes' do +RSpec.describe 'Disabled OAuth routes' do # These routes are disabled via the doorkeeper configuration for # `admin_authenticator`, as these routes should only be accessible by server # administrators. For now, these routes are not properly designed and diff --git a/spec/requests/emojis_spec.rb b/spec/requests/emojis_spec.rb index 458d500762..b2e4702f2d 100644 --- a/spec/requests/emojis_spec.rb +++ b/spec/requests/emojis_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Emojis' do +RSpec.describe 'Emojis' do describe 'GET /emojis/:id' do let(:emoji) { Fabricate(:custom_emoji, shortcode: 'coolcat') } diff --git a/spec/requests/health_spec.rb b/spec/requests/health_spec.rb index 03317f9723..1d2f96bb3d 100644 --- a/spec/requests/health_spec.rb +++ b/spec/requests/health_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Health check endpoint' do +RSpec.describe 'Health check endpoint' do describe 'GET /health' do it 'returns http success when server is functioning' do get '/health' diff --git a/spec/requests/invite_spec.rb b/spec/requests/invite_spec.rb index c44ef2419c..4ce6c78e94 100644 --- a/spec/requests/invite_spec.rb +++ b/spec/requests/invite_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'invites' do +RSpec.describe 'invites' do let(:invite) { Fabricate(:invite) } context 'when requesting a JSON document' do diff --git a/spec/requests/link_headers_spec.rb b/spec/requests/link_headers_spec.rb index 522cff4642..3116a54d6a 100644 --- a/spec/requests/link_headers_spec.rb +++ b/spec/requests/link_headers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Link headers' do +RSpec.describe 'Link headers' do describe 'on the account show page' do let(:account) { Fabricate(:account, username: 'test') } diff --git a/spec/requests/localization_spec.rb b/spec/requests/localization_spec.rb index b7fb53ed8d..26fc204ea4 100644 --- a/spec/requests/localization_spec.rb +++ b/spec/requests/localization_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Localization' do +RSpec.describe 'Localization' do around do |example| I18n.with_locale(I18n.locale) do example.run diff --git a/spec/requests/log_out_spec.rb b/spec/requests/log_out_spec.rb index 62ca1ac547..62ede0c106 100644 --- a/spec/requests/log_out_spec.rb +++ b/spec/requests/log_out_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Log Out' do +RSpec.describe 'Log Out' do include RoutingHelper describe 'DELETE /auth/sign_out' do diff --git a/spec/requests/manifest_spec.rb b/spec/requests/manifest_spec.rb index 55b8147d7e..69e308e3ce 100644 --- a/spec/requests/manifest_spec.rb +++ b/spec/requests/manifest_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Manifest' do +RSpec.describe 'Manifest' do describe 'GET /manifest' do before { get '/manifest' } diff --git a/spec/requests/media_proxy_spec.rb b/spec/requests/media_proxy_spec.rb index 814d4c1166..fb4801ee67 100644 --- a/spec/requests/media_proxy_spec.rb +++ b/spec/requests/media_proxy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Media Proxy' do +RSpec.describe 'Media Proxy' do describe 'GET /media_proxy/:id' do before { stub_attachment_request } diff --git a/spec/requests/omniauth_callbacks_spec.rb b/spec/requests/omniauth_callbacks_spec.rb index 095535e485..e13a49ec62 100644 --- a/spec/requests/omniauth_callbacks_spec.rb +++ b/spec/requests/omniauth_callbacks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'OmniAuth callbacks' do +RSpec.describe 'OmniAuth callbacks' do shared_examples 'omniauth provider callbacks' do |provider| subject { post send :"user_#{provider}_omniauth_callback_path" } diff --git a/spec/requests/remote_interaction_helper_spec.rb b/spec/requests/remote_interaction_helper_spec.rb index e6364fe8ce..942f70b9a4 100644 --- a/spec/requests/remote_interaction_helper_spec.rb +++ b/spec/requests/remote_interaction_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Remote Interaction Helper' do +RSpec.describe 'Remote Interaction Helper' do describe 'GET /remote_interaction_helper' do it 'returns http success' do get remote_interaction_helper_path diff --git a/spec/requests/self_destruct_spec.rb b/spec/requests/self_destruct_spec.rb index f71a2325e2..651a894c89 100644 --- a/spec/requests/self_destruct_spec.rb +++ b/spec/requests/self_destruct_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Self-destruct mode' do +RSpec.describe 'Self-destruct mode' do before do allow(SelfDestructHelper).to receive(:self_destruct?).and_return(true) end diff --git a/spec/requests/settings/exports/blocked_accounts_spec.rb b/spec/requests/settings/exports/blocked_accounts_spec.rb index f335ba18c0..9d0768a1e3 100644 --- a/spec/requests/settings/exports/blocked_accounts_spec.rb +++ b/spec/requests/settings/exports/blocked_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Blocked Accounts' do +RSpec.describe 'Settings / Exports / Blocked Accounts' do describe 'GET /settings/exports/blocks' do context 'with a signed in user who has blocked accounts' do let(:user) { Fabricate :user } diff --git a/spec/requests/settings/exports/blocked_domains_spec.rb b/spec/requests/settings/exports/blocked_domains_spec.rb index 762907585f..838baf8cdb 100644 --- a/spec/requests/settings/exports/blocked_domains_spec.rb +++ b/spec/requests/settings/exports/blocked_domains_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Blocked Domains' do +RSpec.describe 'Settings / Exports / Blocked Domains' do describe 'GET /settings/exports/domain_blocks' do context 'with a signed in user who has blocked domains' do let(:account) { Fabricate :account, domain: 'example.com' } diff --git a/spec/requests/settings/exports/bookmarks_spec.rb b/spec/requests/settings/exports/bookmarks_spec.rb index f200e70383..e97f4a84d2 100644 --- a/spec/requests/settings/exports/bookmarks_spec.rb +++ b/spec/requests/settings/exports/bookmarks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Bookmarks' do +RSpec.describe 'Settings / Exports / Bookmarks' do describe 'GET /settings/exports/bookmarks' do context 'with a signed in user who has bookmarks' do let(:account) { Fabricate(:account, domain: 'foo.bar') } diff --git a/spec/requests/settings/exports/following_accounts_spec.rb b/spec/requests/settings/exports/following_accounts_spec.rb index 268b72c412..c34ec261a6 100644 --- a/spec/requests/settings/exports/following_accounts_spec.rb +++ b/spec/requests/settings/exports/following_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Following Accounts' do +RSpec.describe 'Settings / Exports / Following Accounts' do describe 'GET /settings/exports/follows' do context 'with a signed in user who is following accounts' do let(:user) { Fabricate :user } diff --git a/spec/requests/settings/exports/lists_spec.rb b/spec/requests/settings/exports/lists_spec.rb index b868f8dfda..4c13225bb9 100644 --- a/spec/requests/settings/exports/lists_spec.rb +++ b/spec/requests/settings/exports/lists_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Lists' do +RSpec.describe 'Settings / Exports / Lists' do describe 'GET /settings/exports/lists' do context 'with a signed in user who has lists' do let(:account) { Fabricate(:account, username: 'test', domain: 'example.com') } diff --git a/spec/requests/settings/exports/muted_accounts_spec.rb b/spec/requests/settings/exports/muted_accounts_spec.rb index efdb0d8221..98ccb3e4a2 100644 --- a/spec/requests/settings/exports/muted_accounts_spec.rb +++ b/spec/requests/settings/exports/muted_accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Settings / Exports / Muted Accounts' do +RSpec.describe 'Settings / Exports / Muted Accounts' do describe 'GET /settings/exports/mutes' do context 'with a signed in user who has muted accounts' do let(:user) { Fabricate :user } diff --git a/spec/requests/signature_verification_spec.rb b/spec/requests/signature_verification_spec.rb index 401828c4a3..580d028338 100644 --- a/spec/requests/signature_verification_spec.rb +++ b/spec/requests/signature_verification_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'signature verification concern' do +RSpec.describe 'signature verification concern' do before do stub_tests_controller diff --git a/spec/requests/well_known/change_password_spec.rb b/spec/requests/well_known/change_password_spec.rb index 04134b71ff..77fec15412 100644 --- a/spec/requests/well_known/change_password_spec.rb +++ b/spec/requests/well_known/change_password_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/change-password request' do +RSpec.describe 'The /.well-known/change-password request' do it 'redirects to the change password page' do get '/.well-known/change-password' diff --git a/spec/requests/well_known/host_meta_spec.rb b/spec/requests/well_known/host_meta_spec.rb index ca10a51a01..09f17baa89 100644 --- a/spec/requests/well_known/host_meta_spec.rb +++ b/spec/requests/well_known/host_meta_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/host-meta request' do +RSpec.describe 'The /.well-known/host-meta request' do it 'returns http success with valid XML response' do get '/.well-known/host-meta' diff --git a/spec/requests/well_known/node_info_spec.rb b/spec/requests/well_known/node_info_spec.rb index 0934b0fde6..d02732c32b 100644 --- a/spec/requests/well_known/node_info_spec.rb +++ b/spec/requests/well_known/node_info_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The well-known node-info endpoints' do +RSpec.describe 'The well-known node-info endpoints' do describe 'The /.well-known/node-info endpoint' do it 'returns JSON document pointing to node info' do get '/.well-known/nodeinfo' diff --git a/spec/requests/well_known/oauth_metadata_spec.rb b/spec/requests/well_known/oauth_metadata_spec.rb index 9d2d202286..378295b5a3 100644 --- a/spec/requests/well_known/oauth_metadata_spec.rb +++ b/spec/requests/well_known/oauth_metadata_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/oauth-authorization-server request' do +RSpec.describe 'The /.well-known/oauth-authorization-server request' do let(:protocol) { ENV.fetch('LOCAL_HTTPS', true) ? :https : :http } before do diff --git a/spec/requests/well_known/webfinger_spec.rb b/spec/requests/well_known/webfinger_spec.rb index cd8a35c702..e5ce352d50 100644 --- a/spec/requests/well_known/webfinger_spec.rb +++ b/spec/requests/well_known/webfinger_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'The /.well-known/webfinger endpoint' do +RSpec.describe 'The /.well-known/webfinger endpoint' do subject(:perform_request!) { get webfinger_url(resource: resource) } let(:alternate_domains) { [] } diff --git a/spec/routing/accounts_routing_spec.rb b/spec/routing/accounts_routing_spec.rb index 588855943e..8ff711a681 100644 --- a/spec/routing/accounts_routing_spec.rb +++ b/spec/routing/accounts_routing_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Routes under accounts/' do +RSpec.describe 'Routes under accounts/' do context 'with local username' do let(:username) { 'alice' } diff --git a/spec/routing/api_routing_spec.rb b/spec/routing/api_routing_spec.rb index a822fba4c5..c46fa75d1f 100644 --- a/spec/routing/api_routing_spec.rb +++ b/spec/routing/api_routing_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'API routes' do +RSpec.describe 'API routes' do describe 'Credentials routes' do it 'routes to verify credentials' do expect(get('/api/v1/accounts/verify_credentials')) diff --git a/spec/routing/well_known_routes_spec.rb b/spec/routing/well_known_routes_spec.rb index 8cf08c13c1..6578e939ae 100644 --- a/spec/routing/well_known_routes_spec.rb +++ b/spec/routing/well_known_routes_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Well Known routes' do +RSpec.describe 'Well Known routes' do describe 'the host-meta route' do it 'routes to correct place with xml format' do expect(get('/.well-known/host-meta')) diff --git a/spec/search/models/concerns/account/search_spec.rb b/spec/search/models/concerns/account/search_spec.rb index d8d7f355dd..de12161ef9 100644 --- a/spec/search/models/concerns/account/search_spec.rb +++ b/spec/search/models/concerns/account/search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::Search do +RSpec.describe Account::Search do describe 'a non-discoverable account becoming discoverable' do let(:account) { Account.find_by(username: 'search_test_account_1') } diff --git a/spec/search/models/concerns/account/statuses_search_spec.rb b/spec/search/models/concerns/account/statuses_search_spec.rb index b1bf4968ca..bce1aecd75 100644 --- a/spec/search/models/concerns/account/statuses_search_spec.rb +++ b/spec/search/models/concerns/account/statuses_search_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Account::StatusesSearch, :inline_jobs do +RSpec.describe Account::StatusesSearch, :inline_jobs do describe 'a non-indexable account becoming indexable' do let(:account) { Account.find_by(username: 'search_test_account_1') } diff --git a/spec/serializers/activitypub/device_serializer_spec.rb b/spec/serializers/activitypub/device_serializer_spec.rb index 23f0b24c4e..226e136446 100644 --- a/spec/serializers/activitypub/device_serializer_spec.rb +++ b/spec/serializers/activitypub/device_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DeviceSerializer do +RSpec.describe ActivityPub::DeviceSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:device) } diff --git a/spec/serializers/activitypub/note_serializer_spec.rb b/spec/serializers/activitypub/note_serializer_spec.rb index 338d66b308..285b241ee2 100644 --- a/spec/serializers/activitypub/note_serializer_spec.rb +++ b/spec/serializers/activitypub/note_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::NoteSerializer do +RSpec.describe ActivityPub::NoteSerializer do subject { serialized_record_json(parent, described_class, adapter: ActivityPub::Adapter) } let!(:account) { Fabricate(:account) } diff --git a/spec/serializers/activitypub/one_time_key_serializer_spec.rb b/spec/serializers/activitypub/one_time_key_serializer_spec.rb index 89efe95c8c..b9792ebae3 100644 --- a/spec/serializers/activitypub/one_time_key_serializer_spec.rb +++ b/spec/serializers/activitypub/one_time_key_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::OneTimeKeySerializer do +RSpec.describe ActivityPub::OneTimeKeySerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:one_time_key) } diff --git a/spec/serializers/activitypub/undo_like_serializer_spec.rb b/spec/serializers/activitypub/undo_like_serializer_spec.rb index 3d61e86751..c7190adc1a 100644 --- a/spec/serializers/activitypub/undo_like_serializer_spec.rb +++ b/spec/serializers/activitypub/undo_like_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::UndoLikeSerializer do +RSpec.describe ActivityPub::UndoLikeSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:favourite) } diff --git a/spec/serializers/activitypub/update_poll_serializer_spec.rb b/spec/serializers/activitypub/update_poll_serializer_spec.rb index 8ff4fd2701..6a4d8177fc 100644 --- a/spec/serializers/activitypub/update_poll_serializer_spec.rb +++ b/spec/serializers/activitypub/update_poll_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::UpdatePollSerializer do +RSpec.describe ActivityPub::UpdatePollSerializer do subject { serialized_record_json(status, described_class, adapter: ActivityPub::Adapter) } let(:account) { Fabricate(:account) } diff --git a/spec/serializers/activitypub/vote_serializer_spec.rb b/spec/serializers/activitypub/vote_serializer_spec.rb index b7c0b8928b..4e8a2beca3 100644 --- a/spec/serializers/activitypub/vote_serializer_spec.rb +++ b/spec/serializers/activitypub/vote_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::VoteSerializer do +RSpec.describe ActivityPub::VoteSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:poll_vote) } diff --git a/spec/serializers/rest/account_serializer_spec.rb b/spec/serializers/rest/account_serializer_spec.rb index 15939e484d..7daa0796a9 100644 --- a/spec/serializers/rest/account_serializer_spec.rb +++ b/spec/serializers/rest/account_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::AccountSerializer do +RSpec.describe REST::AccountSerializer do subject { serialized_record_json(account, described_class) } let(:role) { Fabricate(:user_role, name: 'Role', highlighted: true) } diff --git a/spec/serializers/rest/encrypted_message_serializer_spec.rb b/spec/serializers/rest/encrypted_message_serializer_spec.rb index 01db1149af..a4b8ee83b2 100644 --- a/spec/serializers/rest/encrypted_message_serializer_spec.rb +++ b/spec/serializers/rest/encrypted_message_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::EncryptedMessageSerializer do +RSpec.describe REST::EncryptedMessageSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Fabricate(:encrypted_message) } diff --git a/spec/serializers/rest/instance_serializer_spec.rb b/spec/serializers/rest/instance_serializer_spec.rb index 39e6b3820b..2d8d14e39a 100644 --- a/spec/serializers/rest/instance_serializer_spec.rb +++ b/spec/serializers/rest/instance_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::InstanceSerializer do +RSpec.describe REST::InstanceSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { InstancePresenter.new } diff --git a/spec/serializers/rest/keys/claim_result_serializer_spec.rb b/spec/serializers/rest/keys/claim_result_serializer_spec.rb index 7f7fb850cd..e45112705b 100644 --- a/spec/serializers/rest/keys/claim_result_serializer_spec.rb +++ b/spec/serializers/rest/keys/claim_result_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::Keys::ClaimResultSerializer do +RSpec.describe REST::Keys::ClaimResultSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Keys::ClaimService::Result.new(Account.new(id: 123), 456) } diff --git a/spec/serializers/rest/keys/device_serializer_spec.rb b/spec/serializers/rest/keys/device_serializer_spec.rb index 28177a3db5..b8370beac7 100644 --- a/spec/serializers/rest/keys/device_serializer_spec.rb +++ b/spec/serializers/rest/keys/device_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::Keys::DeviceSerializer do +RSpec.describe REST::Keys::DeviceSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Device.new(name: 'Device name') } diff --git a/spec/serializers/rest/keys/query_result_serializer_spec.rb b/spec/serializers/rest/keys/query_result_serializer_spec.rb index ef67d70675..41492f5e78 100644 --- a/spec/serializers/rest/keys/query_result_serializer_spec.rb +++ b/spec/serializers/rest/keys/query_result_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::Keys::QueryResultSerializer do +RSpec.describe REST::Keys::QueryResultSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) { Keys::QueryService::Result.new(Account.new(id: 123), []) } diff --git a/spec/serializers/rest/suggestion_serializer_spec.rb b/spec/serializers/rest/suggestion_serializer_spec.rb index b5efba082d..288d1daa23 100644 --- a/spec/serializers/rest/suggestion_serializer_spec.rb +++ b/spec/serializers/rest/suggestion_serializer_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe REST::SuggestionSerializer do +RSpec.describe REST::SuggestionSerializer do let(:serialization) { serialized_record_json(record, described_class) } let(:record) do AccountSuggestions::Suggestion.new( diff --git a/spec/services/account_search_service_spec.rb b/spec/services/account_search_service_spec.rb index 5ec0885903..7d251641ee 100644 --- a/spec/services/account_search_service_spec.rb +++ b/spec/services/account_search_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountSearchService do +RSpec.describe AccountSearchService do describe '#call' do context 'with a query to ignore' do it 'returns empty array for missing query' do diff --git a/spec/services/account_statuses_cleanup_service_spec.rb b/spec/services/account_statuses_cleanup_service_spec.rb index 403c4632d7..857bd4fda4 100644 --- a/spec/services/account_statuses_cleanup_service_spec.rb +++ b/spec/services/account_statuses_cleanup_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountStatusesCleanupService do +RSpec.describe AccountStatusesCleanupService do let(:account) { Fabricate(:account, username: 'alice', domain: nil) } let(:account_policy) { Fabricate(:account_statuses_cleanup_policy, account: account) } let!(:unrelated_status) { Fabricate(:status, created_at: 3.years.ago) } diff --git a/spec/services/fetch_oembed_service_spec.rb b/spec/services/fetch_oembed_service_spec.rb index c9f84048b6..52d2b9cf22 100644 --- a/spec/services/fetch_oembed_service_spec.rb +++ b/spec/services/fetch_oembed_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FetchOEmbedService do +RSpec.describe FetchOEmbedService do subject { described_class.new } before do diff --git a/spec/services/resolve_url_service_spec.rb b/spec/services/resolve_url_service_spec.rb index 3d59a55f10..80f2a5a4ba 100644 --- a/spec/services/resolve_url_service_spec.rb +++ b/spec/services/resolve_url_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ResolveURLService do +RSpec.describe ResolveURLService do subject { described_class.new } describe '#call' do diff --git a/spec/services/search_service_spec.rb b/spec/services/search_service_spec.rb index 394ee7c3a6..cd4c424630 100644 --- a/spec/services/search_service_spec.rb +++ b/spec/services/search_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe SearchService do +RSpec.describe SearchService do subject { described_class.new } describe '#call' do diff --git a/spec/services/unblock_domain_service_spec.rb b/spec/services/unblock_domain_service_spec.rb index 289ddfc218..405fe1cfd2 100644 --- a/spec/services/unblock_domain_service_spec.rb +++ b/spec/services/unblock_domain_service_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnblockDomainService do +RSpec.describe UnblockDomainService do subject { described_class.new } describe 'call' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2d20239b27..60bec918ea 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,6 +6,8 @@ RSpec.configure do |config| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end + config.disable_monkey_patching! + config.mock_with :rspec do |mocks| mocks.verify_partial_doubles = true end diff --git a/spec/support/examples/api.rb b/spec/support/examples/api.rb index d531860abf..ddc61fcbe0 100644 --- a/spec/support/examples/api.rb +++ b/spec/support/examples/api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'forbidden for wrong scope' do |wrong_scope| +RSpec.shared_examples 'forbidden for wrong scope' do |wrong_scope| let(:scopes) { wrong_scope } it 'returns http forbidden' do @@ -11,7 +11,7 @@ shared_examples 'forbidden for wrong scope' do |wrong_scope| end end -shared_examples 'forbidden for wrong role' do |wrong_role| +RSpec.shared_examples 'forbidden for wrong role' do |wrong_role| let(:role) { UserRole.find_by(name: wrong_role) } it 'returns http forbidden' do diff --git a/spec/support/examples/cli.rb b/spec/support/examples/cli.rb index 091c842bd1..5f357fc915 100644 --- a/spec/support/examples/cli.rb +++ b/spec/support/examples/cli.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'CLI Command' do +RSpec.shared_examples 'CLI Command' do it 'configures Thor to exit on failure' do expect(described_class.exit_on_failure?).to be true end diff --git a/spec/support/examples/lib/admin/checks.rb b/spec/support/examples/lib/admin/checks.rb index b50faa77ba..e8c1336c5f 100644 --- a/spec/support/examples/lib/admin/checks.rb +++ b/spec/support/examples/lib/admin/checks.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'a check available to devops users' do +RSpec.shared_examples 'a check available to devops users' do describe 'skip?' do context 'when user can view devops' do before { allow(user).to receive(:can?).with(:view_devops).and_return(true) } diff --git a/spec/support/examples/mailers.rb b/spec/support/examples/mailers.rb index 213e873b4e..a8469f1964 100644 --- a/spec/support/examples/mailers.rb +++ b/spec/support/examples/mailers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'localized subject' do |*args, **kwrest| +RSpec.shared_examples 'localized subject' do |*args, **kwrest| it 'renders subject localized for the locale of the receiver' do locale = :de receiver.update!(locale: locale) diff --git a/spec/support/examples/models/concerns/account_avatar.rb b/spec/support/examples/models/concerns/account_avatar.rb index ab6020d834..232f51fa3c 100644 --- a/spec/support/examples/models/concerns/account_avatar.rb +++ b/spec/support/examples/models/concerns/account_avatar.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'AccountAvatar' do |fabricator| +RSpec.shared_examples 'AccountAvatar' do |fabricator| describe 'static avatars', :attachment_processing do describe 'when GIF' do it 'creates a png static style' do diff --git a/spec/support/examples/models/concerns/account_header.rb b/spec/support/examples/models/concerns/account_header.rb index 43bbdaacf4..af8d22d633 100644 --- a/spec/support/examples/models/concerns/account_header.rb +++ b/spec/support/examples/models/concerns/account_header.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'AccountHeader' do |fabricator| +RSpec.shared_examples 'AccountHeader' do |fabricator| describe 'base64-encoded files', :attachment_processing do let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" } let(:account) { Fabricate(fabricator, header: base64_attachment) } diff --git a/spec/support/examples/models/concerns/reviewable.rb b/spec/support/examples/models/concerns/reviewable.rb index 562183d1cc..b63e44b43f 100644 --- a/spec/support/examples/models/concerns/reviewable.rb +++ b/spec/support/examples/models/concerns/reviewable.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'Reviewable' do +RSpec.shared_examples 'Reviewable' do subject { described_class.new(reviewed_at: reviewed_at, requested_review_at: requested_review_at) } let(:reviewed_at) { nil } diff --git a/spec/system/about_spec.rb b/spec/system/about_spec.rb index dc976b91e0..f832802f91 100644 --- a/spec/system/about_spec.rb +++ b/spec/system/about_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'About page' do +RSpec.describe 'About page' do it 'visits the about page and renders the web app' do visit about_path diff --git a/spec/system/admin/accounts_spec.rb b/spec/system/admin/accounts_spec.rb index 20813f6be4..c21e01e4f3 100644 --- a/spec/system/admin/accounts_spec.rb +++ b/spec/system/admin/accounts_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Accounts' do +RSpec.describe 'Admin::Accounts' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/announcements_spec.rb b/spec/system/admin/announcements_spec.rb index 5c4e5d3e6a..1da5699656 100644 --- a/spec/system/admin/announcements_spec.rb +++ b/spec/system/admin/announcements_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Announcements' do +RSpec.describe 'Admin::Announcements' do include ActionView::RecordIdentifier describe 'Viewing announcements' do diff --git a/spec/system/admin/custom_emojis_spec.rb b/spec/system/admin/custom_emojis_spec.rb index 8a8b6efcd1..e47f21f8a9 100644 --- a/spec/system/admin/custom_emojis_spec.rb +++ b/spec/system/admin/custom_emojis_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::CustomEmojis' do +RSpec.describe 'Admin::CustomEmojis' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/domain_blocks_spec.rb b/spec/system/admin/domain_blocks_spec.rb index 99aa7cf1a7..9a39e29062 100644 --- a/spec/system/admin/domain_blocks_spec.rb +++ b/spec/system/admin/domain_blocks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'blocking domains through the moderation interface' do +RSpec.describe 'blocking domains through the moderation interface' do before do allow(DomainBlockWorker).to receive(:perform_async).and_return(true) sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user diff --git a/spec/system/admin/email_domain_blocks_spec.rb b/spec/system/admin/email_domain_blocks_spec.rb index 14959cbe74..a90bede827 100644 --- a/spec/system/admin/email_domain_blocks_spec.rb +++ b/spec/system/admin/email_domain_blocks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::EmailDomainBlocks' do +RSpec.describe 'Admin::EmailDomainBlocks' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/ip_blocks_spec.rb b/spec/system/admin/ip_blocks_spec.rb index c9b16f6f78..9c03520277 100644 --- a/spec/system/admin/ip_blocks_spec.rb +++ b/spec/system/admin/ip_blocks_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::IpBlocks' do +RSpec.describe 'Admin::IpBlocks' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/reset_spec.rb b/spec/system/admin/reset_spec.rb index 50fb4b46df..1e787ea110 100644 --- a/spec/system/admin/reset_spec.rb +++ b/spec/system/admin/reset_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Reset' do +RSpec.describe 'Admin::Reset' do it 'Resets password for account user' do account = Fabricate :account sign_in admin_user diff --git a/spec/system/admin/settings/about_spec.rb b/spec/system/admin/settings/about_spec.rb index 0f8ae5605c..c7405a8d5a 100644 --- a/spec/system/admin/settings/about_spec.rb +++ b/spec/system/admin/settings/about_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::About' do +RSpec.describe 'Admin::Settings::About' do it 'Saves changes to about settings' do sign_in admin_user visit admin_settings_about_path diff --git a/spec/system/admin/settings/appearance_spec.rb b/spec/system/admin/settings/appearance_spec.rb index 99e97ea4d1..56af58c812 100644 --- a/spec/system/admin/settings/appearance_spec.rb +++ b/spec/system/admin/settings/appearance_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Appearance' do +RSpec.describe 'Admin::Settings::Appearance' do it 'Saves changes to appearance settings' do sign_in admin_user visit admin_settings_appearance_path diff --git a/spec/system/admin/settings/branding_spec.rb b/spec/system/admin/settings/branding_spec.rb index ac47e04d53..5cd9319ce0 100644 --- a/spec/system/admin/settings/branding_spec.rb +++ b/spec/system/admin/settings/branding_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Branding' do +RSpec.describe 'Admin::Settings::Branding' do it 'Saves changes to branding settings' do sign_in admin_user visit admin_settings_branding_path diff --git a/spec/system/admin/settings/content_retention_spec.rb b/spec/system/admin/settings/content_retention_spec.rb index 9867122675..f788f8eea0 100644 --- a/spec/system/admin/settings/content_retention_spec.rb +++ b/spec/system/admin/settings/content_retention_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::ContentRetention' do +RSpec.describe 'Admin::Settings::ContentRetention' do it 'Saves changes to content retention settings' do sign_in admin_user visit admin_settings_content_retention_path diff --git a/spec/system/admin/settings/discovery_spec.rb b/spec/system/admin/settings/discovery_spec.rb index bdab91107d..f000d18370 100644 --- a/spec/system/admin/settings/discovery_spec.rb +++ b/spec/system/admin/settings/discovery_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Discovery' do +RSpec.describe 'Admin::Settings::Discovery' do it 'Saves changes to discovery settings' do sign_in admin_user visit admin_settings_discovery_path diff --git a/spec/system/admin/settings/registrations_spec.rb b/spec/system/admin/settings/registrations_spec.rb index 88c750e8ee..d026b07c85 100644 --- a/spec/system/admin/settings/registrations_spec.rb +++ b/spec/system/admin/settings/registrations_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Settings::Registrations' do +RSpec.describe 'Admin::Settings::Registrations' do it 'Saves changes to registrations settings' do sign_in admin_user visit admin_settings_registrations_path diff --git a/spec/system/admin/software_updates_spec.rb b/spec/system/admin/software_updates_spec.rb index 4a635d1a79..77e9f16684 100644 --- a/spec/system/admin/software_updates_spec.rb +++ b/spec/system/admin/software_updates_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'finding software updates through the admin interface' do +RSpec.describe 'finding software updates through the admin interface' do before do Fabricate(:software_update, version: '99.99.99', type: 'major', urgent: true, release_notes: 'https://github.com/mastodon/mastodon/releases/v99') diff --git a/spec/system/admin/statuses_spec.rb b/spec/system/admin/statuses_spec.rb index 531d0de953..bb76a2963d 100644 --- a/spec/system/admin/statuses_spec.rb +++ b/spec/system/admin/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Statuses' do +RSpec.describe 'Admin::Statuses' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/links/preview_card_providers_spec.rb b/spec/system/admin/trends/links/preview_card_providers_spec.rb index dca89117b1..16343a6891 100644 --- a/spec/system/admin/trends/links/preview_card_providers_spec.rb +++ b/spec/system/admin/trends/links/preview_card_providers_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Links::PreviewCardProviders' do +RSpec.describe 'Admin::Trends::Links::PreviewCardProviders' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/links_spec.rb b/spec/system/admin/trends/links_spec.rb index 99638bc069..7a51c337c9 100644 --- a/spec/system/admin/trends/links_spec.rb +++ b/spec/system/admin/trends/links_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Links' do +RSpec.describe 'Admin::Trends::Links' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/statuses_spec.rb b/spec/system/admin/trends/statuses_spec.rb index 779a15d38f..13fc966dfd 100644 --- a/spec/system/admin/trends/statuses_spec.rb +++ b/spec/system/admin/trends/statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Statuses' do +RSpec.describe 'Admin::Trends::Statuses' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/admin/trends/tags_spec.rb b/spec/system/admin/trends/tags_spec.rb index 52e49c3a5d..d914badbd4 100644 --- a/spec/system/admin/trends/tags_spec.rb +++ b/spec/system/admin/trends/tags_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Admin::Trends::Tags' do +RSpec.describe 'Admin::Trends::Tags' do let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) } before do diff --git a/spec/system/captcha_spec.rb b/spec/system/captcha_spec.rb index 06c823adf2..4c0ce02d1b 100644 --- a/spec/system/captcha_spec.rb +++ b/spec/system/captcha_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'email confirmation flow when captcha is enabled' do +RSpec.describe 'email confirmation flow when captcha is enabled' do let(:user) { Fabricate(:user, confirmed_at: nil, confirmation_token: 'foobar', created_by_application: client_app) } let(:client_app) { nil } diff --git a/spec/system/filters_spec.rb b/spec/system/filters_spec.rb index a0cb965a61..052b5e1730 100644 --- a/spec/system/filters_spec.rb +++ b/spec/system/filters_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Filters' do +RSpec.describe 'Filters' do let(:user) { Fabricate(:user) } let(:filter_title) { 'Filter of fun and games' } diff --git a/spec/system/home_spec.rb b/spec/system/home_spec.rb index 08b9737d6b..c1ce4e1726 100644 --- a/spec/system/home_spec.rb +++ b/spec/system/home_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Home page' do +RSpec.describe 'Home page' do context 'when signed in' do before { sign_in Fabricate(:user) } diff --git a/spec/system/log_in_spec.rb b/spec/system/log_in_spec.rb index 8a73c42d2e..f8765e8e1c 100644 --- a/spec/system/log_in_spec.rb +++ b/spec/system/log_in_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Log in' do +RSpec.describe 'Log in' do include ProfileStories subject { page } diff --git a/spec/system/log_out_spec.rb b/spec/system/log_out_spec.rb index f50f7c2d18..2e52254ca0 100644 --- a/spec/system/log_out_spec.rb +++ b/spec/system/log_out_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Log out' do +RSpec.describe 'Log out' do include ProfileStories before do diff --git a/spec/system/new_statuses_spec.rb b/spec/system/new_statuses_spec.rb index 2f2fcf2248..317508a0bb 100644 --- a/spec/system/new_statuses_spec.rb +++ b/spec/system/new_statuses_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'NewStatuses', :inline_jobs, :js, :streaming do +RSpec.describe 'NewStatuses', :inline_jobs, :js, :streaming do include ProfileStories subject { page } diff --git a/spec/system/oauth_spec.rb b/spec/system/oauth_spec.rb index 5d06f6111c..0f96a59675 100644 --- a/spec/system/oauth_spec.rb +++ b/spec/system/oauth_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Using OAuth from an external app' do +RSpec.describe 'Using OAuth from an external app' do include ProfileStories subject { visit "/oauth/authorize?#{params.to_query}" } diff --git a/spec/system/ocr_spec.rb b/spec/system/ocr_spec.rb index 17d18af158..fc816b6dba 100644 --- a/spec/system/ocr_spec.rb +++ b/spec/system/ocr_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'OCR', :attachment_processing, :inline_jobs, :js, :streaming do +RSpec.describe 'OCR', :attachment_processing, :inline_jobs, :js, :streaming do include ProfileStories let(:email) { 'test@example.com' } diff --git a/spec/system/privacy_spec.rb b/spec/system/privacy_spec.rb index f2ab1310cc..631440ebb2 100644 --- a/spec/system/privacy_spec.rb +++ b/spec/system/privacy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Privacy policy page' do +RSpec.describe 'Privacy policy page' do it 'visits the privacy policy page and renders the web app' do visit privacy_policy_path diff --git a/spec/system/profile_spec.rb b/spec/system/profile_spec.rb index 2517e823b5..7e3cbfd334 100644 --- a/spec/system/profile_spec.rb +++ b/spec/system/profile_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Profile' do +RSpec.describe 'Profile' do include ProfileStories subject { page } diff --git a/spec/system/redirections_spec.rb b/spec/system/redirections_spec.rb index f73ab58470..860bbdd6b7 100644 --- a/spec/system/redirections_spec.rb +++ b/spec/system/redirections_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'redirection confirmations' do +RSpec.describe 'redirection confirmations' do let(:account) { Fabricate(:account, domain: 'example.com', uri: 'https://example.com/users/foo', url: 'https://example.com/@foo') } let(:status) { Fabricate(:status, account: account, uri: 'https://example.com/users/foo/statuses/1', url: 'https://example.com/@foo/1') } diff --git a/spec/system/report_interface_spec.rb b/spec/system/report_interface_spec.rb index e6cc3b1b68..257a1cd6fd 100644 --- a/spec/system/report_interface_spec.rb +++ b/spec/system/report_interface_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'report interface', :attachment_processing, :js, :streaming do +RSpec.describe 'report interface', :attachment_processing, :js, :streaming do include ProfileStories let(:email) { 'admin@example.com' } diff --git a/spec/system/severed_relationships_spec.rb b/spec/system/severed_relationships_spec.rb index b933398a08..4a7bf3e280 100644 --- a/spec/system/severed_relationships_spec.rb +++ b/spec/system/severed_relationships_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Severed relationships page' do +RSpec.describe 'Severed relationships page' do include ProfileStories describe 'GET severed_relationships#index' do diff --git a/spec/system/share_entrypoint_spec.rb b/spec/system/share_entrypoint_spec.rb index 5e27781f2a..7ccfee599a 100644 --- a/spec/system/share_entrypoint_spec.rb +++ b/spec/system/share_entrypoint_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Share page', :js, :streaming do +RSpec.describe 'Share page', :js, :streaming do include ProfileStories let(:email) { 'test@example.com' } diff --git a/spec/system/unlogged_spec.rb b/spec/system/unlogged_spec.rb index 417ccdaeb6..26d1bd4542 100644 --- a/spec/system/unlogged_spec.rb +++ b/spec/system/unlogged_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'UnloggedBrowsing', :js, :streaming do +RSpec.describe 'UnloggedBrowsing', :js, :streaming do subject { page } before do diff --git a/spec/validators/email_mx_validator_spec.rb b/spec/validators/email_mx_validator_spec.rb index 23a5f768ef..7109c9f4e2 100644 --- a/spec/validators/email_mx_validator_spec.rb +++ b/spec/validators/email_mx_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe EmailMxValidator do +RSpec.describe EmailMxValidator do describe '#validate' do let(:user) { instance_double(User, email: 'foo@example.com', sign_up_ip: '1.2.3.4', errors: instance_double(ActiveModel::Errors, add: nil)) } let(:resolv_dns_double) { instance_double(Resolv::DNS) } diff --git a/spec/validators/existing_username_validator_spec.rb b/spec/validators/existing_username_validator_spec.rb index 4f1dd55a17..25ecb1fbcd 100644 --- a/spec/validators/existing_username_validator_spec.rb +++ b/spec/validators/existing_username_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ExistingUsernameValidator do +RSpec.describe ExistingUsernameValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/validators/language_validator_spec.rb b/spec/validators/language_validator_spec.rb index cb693dcd81..19e55f3467 100644 --- a/spec/validators/language_validator_spec.rb +++ b/spec/validators/language_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe LanguageValidator do +RSpec.describe LanguageValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/validators/note_length_validator_spec.rb b/spec/validators/note_length_validator_spec.rb index 3bca93a283..3fdb4ae8b9 100644 --- a/spec/validators/note_length_validator_spec.rb +++ b/spec/validators/note_length_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe NoteLengthValidator do +RSpec.describe NoteLengthValidator do subject { described_class.new(attributes: { note: true }, maximum: 500) } describe '#validate' do diff --git a/spec/validators/reaction_validator_spec.rb b/spec/validators/reaction_validator_spec.rb index f99c1cb5f9..c4d4a51779 100644 --- a/spec/validators/reaction_validator_spec.rb +++ b/spec/validators/reaction_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ReactionValidator do +RSpec.describe ReactionValidator do let(:announcement) { Fabricate(:announcement) } describe '#validate' do diff --git a/spec/validators/status_length_validator_spec.rb b/spec/validators/status_length_validator_spec.rb index 249b90f490..ecbfd4ba37 100644 --- a/spec/validators/status_length_validator_spec.rb +++ b/spec/validators/status_length_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe StatusLengthValidator do +RSpec.describe StatusLengthValidator do describe '#validate' do before { stub_const("#{described_class}::MAX_CHARS", 500) } # Example values below are relative to this baseline diff --git a/spec/validators/unique_username_validator_spec.rb b/spec/validators/unique_username_validator_spec.rb index 0d172c8408..037ddadb9f 100644 --- a/spec/validators/unique_username_validator_spec.rb +++ b/spec/validators/unique_username_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UniqueUsernameValidator do +RSpec.describe UniqueUsernameValidator do describe '#validate' do context 'when local account' do it 'does not add errors if username is nil' do diff --git a/spec/validators/unreserved_username_validator_spec.rb b/spec/validators/unreserved_username_validator_spec.rb index 0eb5f83683..ad1092109d 100644 --- a/spec/validators/unreserved_username_validator_spec.rb +++ b/spec/validators/unreserved_username_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnreservedUsernameValidator do +RSpec.describe UnreservedUsernameValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/validators/url_validator_spec.rb b/spec/validators/url_validator_spec.rb index 4f32b7b399..2297dddaa0 100644 --- a/spec/validators/url_validator_spec.rb +++ b/spec/validators/url_validator_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe URLValidator do +RSpec.describe URLValidator do let(:record_class) do Class.new do include ActiveModel::Validations diff --git a/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb b/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb index 82a1dee6d7..47a8564eff 100644 --- a/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb +++ b/spec/views/admin/trends/links/_preview_card.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'admin/trends/links/_preview_card.html.haml' do +RSpec.describe 'admin/trends/links/_preview_card.html.haml' do it 'correctly escapes user supplied url values' do form = instance_double(ActionView::Helpers::FormHelper, check_box: nil) trend = PreviewCardTrend.new(allowed: false) diff --git a/spec/views/statuses/show.html.haml_spec.rb b/spec/views/statuses/show.html.haml_spec.rb index fd08f2772d..1afcb046d4 100644 --- a/spec/views/statuses/show.html.haml_spec.rb +++ b/spec/views/statuses/show.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'statuses/show.html.haml' do +RSpec.describe 'statuses/show.html.haml' do let(:alice) { Fabricate(:account, username: 'alice', display_name: 'Alice') } let(:status) { Fabricate(:status, account: alice, text: 'Hello World') } diff --git a/spec/workers/account_refresh_worker_spec.rb b/spec/workers/account_refresh_worker_spec.rb index 361d69aa0a..3e88e8db28 100644 --- a/spec/workers/account_refresh_worker_spec.rb +++ b/spec/workers/account_refresh_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AccountRefreshWorker do +RSpec.describe AccountRefreshWorker do let(:worker) { described_class.new } let(:service) { instance_double(ResolveAccountService, call: true) } diff --git a/spec/workers/activitypub/delivery_worker_spec.rb b/spec/workers/activitypub/delivery_worker_spec.rb index efce610ae4..3dfbef31a4 100644 --- a/spec/workers/activitypub/delivery_worker_spec.rb +++ b/spec/workers/activitypub/delivery_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DeliveryWorker do +RSpec.describe ActivityPub::DeliveryWorker do include RoutingHelper subject { described_class.new } diff --git a/spec/workers/activitypub/distribute_poll_update_worker_spec.rb b/spec/workers/activitypub/distribute_poll_update_worker_spec.rb index 4427cfdf95..9ff4731f96 100644 --- a/spec/workers/activitypub/distribute_poll_update_worker_spec.rb +++ b/spec/workers/activitypub/distribute_poll_update_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DistributePollUpdateWorker do +RSpec.describe ActivityPub::DistributePollUpdateWorker do subject { described_class.new } let(:account) { Fabricate(:account) } diff --git a/spec/workers/activitypub/distribution_worker_spec.rb b/spec/workers/activitypub/distribution_worker_spec.rb index 0eb6227859..9e5db53185 100644 --- a/spec/workers/activitypub/distribution_worker_spec.rb +++ b/spec/workers/activitypub/distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::DistributionWorker do +RSpec.describe ActivityPub::DistributionWorker do subject { described_class.new } let(:status) { Fabricate(:status) } diff --git a/spec/workers/activitypub/fetch_replies_worker_spec.rb b/spec/workers/activitypub/fetch_replies_worker_spec.rb index 2d080e286e..56d19705a4 100644 --- a/spec/workers/activitypub/fetch_replies_worker_spec.rb +++ b/spec/workers/activitypub/fetch_replies_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::FetchRepliesWorker do +RSpec.describe ActivityPub::FetchRepliesWorker do subject { described_class.new } let(:account) { Fabricate(:account, domain: 'example.com') } diff --git a/spec/workers/activitypub/move_distribution_worker_spec.rb b/spec/workers/activitypub/move_distribution_worker_spec.rb index c810b33c23..63396834de 100644 --- a/spec/workers/activitypub/move_distribution_worker_spec.rb +++ b/spec/workers/activitypub/move_distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::MoveDistributionWorker do +RSpec.describe ActivityPub::MoveDistributionWorker do subject { described_class.new } let(:migration) { Fabricate(:account_migration) } diff --git a/spec/workers/activitypub/post_upgrade_worker_spec.rb b/spec/workers/activitypub/post_upgrade_worker_spec.rb index 08de150ad9..fe1c5e895e 100644 --- a/spec/workers/activitypub/post_upgrade_worker_spec.rb +++ b/spec/workers/activitypub/post_upgrade_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::PostUpgradeWorker do +RSpec.describe ActivityPub::PostUpgradeWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/activitypub/processing_worker_spec.rb b/spec/workers/activitypub/processing_worker_spec.rb index 66d1cf4890..c06ba63d39 100644 --- a/spec/workers/activitypub/processing_worker_spec.rb +++ b/spec/workers/activitypub/processing_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::ProcessingWorker do +RSpec.describe ActivityPub::ProcessingWorker do subject { described_class.new } let(:account) { Fabricate(:account) } diff --git a/spec/workers/activitypub/status_update_distribution_worker_spec.rb b/spec/workers/activitypub/status_update_distribution_worker_spec.rb index 66e52c4f28..e9a70d11d1 100644 --- a/spec/workers/activitypub/status_update_distribution_worker_spec.rb +++ b/spec/workers/activitypub/status_update_distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::StatusUpdateDistributionWorker do +RSpec.describe ActivityPub::StatusUpdateDistributionWorker do subject { described_class.new } let(:status) { Fabricate(:status, text: 'foo') } diff --git a/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb b/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb index 8cf13cb900..d10ea8a75e 100644 --- a/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb +++ b/spec/workers/activitypub/synchronize_featured_tags_collection_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::SynchronizeFeaturedTagsCollectionWorker do +RSpec.describe ActivityPub::SynchronizeFeaturedTagsCollectionWorker do let(:worker) { described_class.new } let(:service) { instance_double(ActivityPub::FetchFeaturedTagsCollectionService, call: true) } diff --git a/spec/workers/activitypub/update_distribution_worker_spec.rb b/spec/workers/activitypub/update_distribution_worker_spec.rb index b183a58dfd..7d78606398 100644 --- a/spec/workers/activitypub/update_distribution_worker_spec.rb +++ b/spec/workers/activitypub/update_distribution_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ActivityPub::UpdateDistributionWorker do +RSpec.describe ActivityPub::UpdateDistributionWorker do subject { described_class.new } let(:account) { Fabricate(:account) } diff --git a/spec/workers/add_to_public_statuses_index_worker_spec.rb b/spec/workers/add_to_public_statuses_index_worker_spec.rb index fa15072241..edaec1dd3a 100644 --- a/spec/workers/add_to_public_statuses_index_worker_spec.rb +++ b/spec/workers/add_to_public_statuses_index_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AddToPublicStatusesIndexWorker do +RSpec.describe AddToPublicStatusesIndexWorker do describe '#perform' do let(:account) { Fabricate(:account, indexable: indexable) } let(:account_id) { account.id } diff --git a/spec/workers/admin/account_deletion_worker_spec.rb b/spec/workers/admin/account_deletion_worker_spec.rb index 631cab6648..e41b734f21 100644 --- a/spec/workers/admin/account_deletion_worker_spec.rb +++ b/spec/workers/admin/account_deletion_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::AccountDeletionWorker do +RSpec.describe Admin::AccountDeletionWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/admin/domain_purge_worker_spec.rb b/spec/workers/admin/domain_purge_worker_spec.rb index 861fd71a7f..32bdd0868b 100644 --- a/spec/workers/admin/domain_purge_worker_spec.rb +++ b/spec/workers/admin/domain_purge_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::DomainPurgeWorker do +RSpec.describe Admin::DomainPurgeWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/admin/suspension_worker_spec.rb b/spec/workers/admin/suspension_worker_spec.rb index da12037edc..445e0b635e 100644 --- a/spec/workers/admin/suspension_worker_spec.rb +++ b/spec/workers/admin/suspension_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Admin::SuspensionWorker do +RSpec.describe Admin::SuspensionWorker do let(:worker) { described_class.new } let(:service) { instance_double(SuspendAccountService, call: true) } diff --git a/spec/workers/after_account_domain_block_worker_spec.rb b/spec/workers/after_account_domain_block_worker_spec.rb index 54a113a2b3..56f5957ea2 100644 --- a/spec/workers/after_account_domain_block_worker_spec.rb +++ b/spec/workers/after_account_domain_block_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe AfterAccountDomainBlockWorker do +RSpec.describe AfterAccountDomainBlockWorker do let(:worker) { described_class.new } let(:service) { instance_double(AfterBlockDomainFromAccountService, call: true) } diff --git a/spec/workers/backup_worker_spec.rb b/spec/workers/backup_worker_spec.rb index db1b50140b..5d1d91267a 100644 --- a/spec/workers/backup_worker_spec.rb +++ b/spec/workers/backup_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe BackupWorker do +RSpec.describe BackupWorker do let(:worker) { described_class.new } let(:service) { instance_double(BackupService, call: true) } diff --git a/spec/workers/bulk_import_worker_spec.rb b/spec/workers/bulk_import_worker_spec.rb index 91f51fbb42..2d429c880b 100644 --- a/spec/workers/bulk_import_worker_spec.rb +++ b/spec/workers/bulk_import_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe BulkImportWorker do +RSpec.describe BulkImportWorker do subject { described_class.new } let(:import) { Fabricate(:bulk_import, state: :scheduled) } diff --git a/spec/workers/cache_buster_worker_spec.rb b/spec/workers/cache_buster_worker_spec.rb index adeb287fa3..b6948395b8 100644 --- a/spec/workers/cache_buster_worker_spec.rb +++ b/spec/workers/cache_buster_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe CacheBusterWorker do +RSpec.describe CacheBusterWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/delete_mute_worker_spec.rb b/spec/workers/delete_mute_worker_spec.rb index 1fc84491c3..a5d1fe343d 100644 --- a/spec/workers/delete_mute_worker_spec.rb +++ b/spec/workers/delete_mute_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DeleteMuteWorker do +RSpec.describe DeleteMuteWorker do let(:worker) { described_class.new } let(:service) { instance_double(UnmuteService, call: true) } diff --git a/spec/workers/domain_block_worker_spec.rb b/spec/workers/domain_block_worker_spec.rb index 33c3ca009a..c55aa2c0c3 100644 --- a/spec/workers/domain_block_worker_spec.rb +++ b/spec/workers/domain_block_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DomainBlockWorker do +RSpec.describe DomainBlockWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/domain_clear_media_worker_spec.rb b/spec/workers/domain_clear_media_worker_spec.rb index 21f8f87b2f..20911007b0 100644 --- a/spec/workers/domain_clear_media_worker_spec.rb +++ b/spec/workers/domain_clear_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe DomainClearMediaWorker do +RSpec.describe DomainClearMediaWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/feed_insert_worker_spec.rb b/spec/workers/feed_insert_worker_spec.rb index e9484879ff..92ae304d0e 100644 --- a/spec/workers/feed_insert_worker_spec.rb +++ b/spec/workers/feed_insert_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FeedInsertWorker do +RSpec.describe FeedInsertWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/filtered_notification_cleanup_worker_spec.rb b/spec/workers/filtered_notification_cleanup_worker_spec.rb index 2636b70ad4..5ecd4291af 100644 --- a/spec/workers/filtered_notification_cleanup_worker_spec.rb +++ b/spec/workers/filtered_notification_cleanup_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe FilteredNotificationCleanupWorker do +RSpec.describe FilteredNotificationCleanupWorker do describe '#perform' do let(:sender) { Fabricate(:account) } let(:recipient) { Fabricate(:account) } diff --git a/spec/workers/import/row_worker_spec.rb b/spec/workers/import/row_worker_spec.rb index 0a71a838fc..edb02cb391 100644 --- a/spec/workers/import/row_worker_spec.rb +++ b/spec/workers/import/row_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Import::RowWorker do +RSpec.describe Import::RowWorker do subject { described_class.new } let(:row) { Fabricate(:bulk_import_row, bulk_import: import) } diff --git a/spec/workers/import_worker_spec.rb b/spec/workers/import_worker_spec.rb index 4095a5d354..1d34aafe86 100644 --- a/spec/workers/import_worker_spec.rb +++ b/spec/workers/import_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ImportWorker do +RSpec.describe ImportWorker do let(:worker) { described_class.new } let(:service) { instance_double(ImportService, call: true) } diff --git a/spec/workers/move_worker_spec.rb b/spec/workers/move_worker_spec.rb index b25992e44b..a24de57e27 100644 --- a/spec/workers/move_worker_spec.rb +++ b/spec/workers/move_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe MoveWorker do +RSpec.describe MoveWorker do subject { described_class.new } let(:local_follower) { Fabricate(:account, domain: nil) } diff --git a/spec/workers/poll_expiration_notify_worker_spec.rb b/spec/workers/poll_expiration_notify_worker_spec.rb index 4bd90270d8..b3ccdd3d77 100644 --- a/spec/workers/poll_expiration_notify_worker_spec.rb +++ b/spec/workers/poll_expiration_notify_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PollExpirationNotifyWorker do +RSpec.describe PollExpirationNotifyWorker do let(:worker) { described_class.new } let(:account) { Fabricate(:account, domain: remote? ? 'example.com' : nil) } let(:status) { Fabricate(:status, account: account) } diff --git a/spec/workers/post_process_media_worker_spec.rb b/spec/workers/post_process_media_worker_spec.rb index 1a274623d7..f4b441a920 100644 --- a/spec/workers/post_process_media_worker_spec.rb +++ b/spec/workers/post_process_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PostProcessMediaWorker, :attachment_processing do +RSpec.describe PostProcessMediaWorker, :attachment_processing do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/publish_announcement_reaction_worker_spec.rb b/spec/workers/publish_announcement_reaction_worker_spec.rb index 91668b5ada..37687ca1a8 100644 --- a/spec/workers/publish_announcement_reaction_worker_spec.rb +++ b/spec/workers/publish_announcement_reaction_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublishAnnouncementReactionWorker do +RSpec.describe PublishAnnouncementReactionWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/publish_scheduled_announcement_worker_spec.rb b/spec/workers/publish_scheduled_announcement_worker_spec.rb index 2e50d4a50d..c4e17903a9 100644 --- a/spec/workers/publish_scheduled_announcement_worker_spec.rb +++ b/spec/workers/publish_scheduled_announcement_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublishScheduledAnnouncementWorker do +RSpec.describe PublishScheduledAnnouncementWorker do subject { described_class.new } let!(:remote_account) { Fabricate(:account, domain: 'domain.com', username: 'foo', uri: 'https://domain.com/users/foo') } diff --git a/spec/workers/publish_scheduled_status_worker_spec.rb b/spec/workers/publish_scheduled_status_worker_spec.rb index f8547e6fe2..35e510d253 100644 --- a/spec/workers/publish_scheduled_status_worker_spec.rb +++ b/spec/workers/publish_scheduled_status_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PublishScheduledStatusWorker do +RSpec.describe PublishScheduledStatusWorker do subject { described_class.new } let(:scheduled_status) { Fabricate(:scheduled_status, params: { text: 'Hello world, future!' }) } diff --git a/spec/workers/push_conversation_worker_spec.rb b/spec/workers/push_conversation_worker_spec.rb index 5fbb4c6853..d651059c9a 100644 --- a/spec/workers/push_conversation_worker_spec.rb +++ b/spec/workers/push_conversation_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PushConversationWorker do +RSpec.describe PushConversationWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/push_encrypted_message_worker_spec.rb b/spec/workers/push_encrypted_message_worker_spec.rb index 3cd04ce7b4..311545cf56 100644 --- a/spec/workers/push_encrypted_message_worker_spec.rb +++ b/spec/workers/push_encrypted_message_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PushEncryptedMessageWorker do +RSpec.describe PushEncryptedMessageWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/push_update_worker_spec.rb b/spec/workers/push_update_worker_spec.rb index c8f94fa82a..6206ab5986 100644 --- a/spec/workers/push_update_worker_spec.rb +++ b/spec/workers/push_update_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe PushUpdateWorker do +RSpec.describe PushUpdateWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/redownload_avatar_worker_spec.rb b/spec/workers/redownload_avatar_worker_spec.rb index 6ef320bc4f..6712ce8f40 100644 --- a/spec/workers/redownload_avatar_worker_spec.rb +++ b/spec/workers/redownload_avatar_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RedownloadAvatarWorker do +RSpec.describe RedownloadAvatarWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/redownload_header_worker_spec.rb b/spec/workers/redownload_header_worker_spec.rb index 746c1a63ff..a57ed31792 100644 --- a/spec/workers/redownload_header_worker_spec.rb +++ b/spec/workers/redownload_header_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RedownloadHeaderWorker do +RSpec.describe RedownloadHeaderWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/redownload_media_worker_spec.rb b/spec/workers/redownload_media_worker_spec.rb index cd561d148b..adf9a7171c 100644 --- a/spec/workers/redownload_media_worker_spec.rb +++ b/spec/workers/redownload_media_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RedownloadMediaWorker do +RSpec.describe RedownloadMediaWorker do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/refollow_worker_spec.rb b/spec/workers/refollow_worker_spec.rb index 5718d4db49..30d5327947 100644 --- a/spec/workers/refollow_worker_spec.rb +++ b/spec/workers/refollow_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RefollowWorker do +RSpec.describe RefollowWorker do subject { described_class.new } let(:account) { Fabricate(:account, domain: 'example.org', protocol: :activitypub) } diff --git a/spec/workers/regeneration_worker_spec.rb b/spec/workers/regeneration_worker_spec.rb index 37b0a04c49..980f1d81db 100644 --- a/spec/workers/regeneration_worker_spec.rb +++ b/spec/workers/regeneration_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RegenerationWorker do +RSpec.describe RegenerationWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/removal_worker_spec.rb b/spec/workers/removal_worker_spec.rb index 5071e882b6..784e72441c 100644 --- a/spec/workers/removal_worker_spec.rb +++ b/spec/workers/removal_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RemovalWorker do +RSpec.describe RemovalWorker do let(:worker) { described_class.new } let(:service) { instance_double(RemoveStatusService, call: true) } diff --git a/spec/workers/remove_featured_tag_worker_spec.rb b/spec/workers/remove_featured_tag_worker_spec.rb index a64bd0605f..7866824ee7 100644 --- a/spec/workers/remove_featured_tag_worker_spec.rb +++ b/spec/workers/remove_featured_tag_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RemoveFeaturedTagWorker do +RSpec.describe RemoveFeaturedTagWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/remove_from_public_statuses_index_worker_spec.rb b/spec/workers/remove_from_public_statuses_index_worker_spec.rb index 43ff211eaa..90f05d6a26 100644 --- a/spec/workers/remove_from_public_statuses_index_worker_spec.rb +++ b/spec/workers/remove_from_public_statuses_index_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe RemoveFromPublicStatusesIndexWorker do +RSpec.describe RemoveFromPublicStatusesIndexWorker do describe '#perform' do let(:account) { Fabricate(:account, indexable: indexable) } let(:account_id) { account.id } diff --git a/spec/workers/resolve_account_worker_spec.rb b/spec/workers/resolve_account_worker_spec.rb index 6f3cff099f..de349adacb 100644 --- a/spec/workers/resolve_account_worker_spec.rb +++ b/spec/workers/resolve_account_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ResolveAccountWorker do +RSpec.describe ResolveAccountWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb index 08ebf82785..28a4176193 100644 --- a/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::AccountsStatusesCleanupScheduler do +RSpec.describe Scheduler::AccountsStatusesCleanupScheduler do subject { described_class.new } let!(:account_alice) { Fabricate(:account, domain: nil, username: 'alice') } diff --git a/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb b/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb index c0c50b128d..d9355248ba 100644 --- a/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb +++ b/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::AutoCloseRegistrationsScheduler do +RSpec.describe Scheduler::AutoCloseRegistrationsScheduler do subject { described_class.new } describe '#perform' do diff --git a/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb b/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb index 246012e128..eb9d88e59a 100644 --- a/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb +++ b/spec/workers/scheduler/follow_recommendations_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::FollowRecommendationsScheduler do +RSpec.describe Scheduler::FollowRecommendationsScheduler do let!(:target_accounts) do Fabricate.times(3, :account) do statuses(count: 6) diff --git a/spec/workers/scheduler/indexing_scheduler_spec.rb b/spec/workers/scheduler/indexing_scheduler_spec.rb index 568f0fc84d..39a88e8063 100644 --- a/spec/workers/scheduler/indexing_scheduler_spec.rb +++ b/spec/workers/scheduler/indexing_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::IndexingScheduler do +RSpec.describe Scheduler::IndexingScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/instance_refresh_scheduler_spec.rb b/spec/workers/scheduler/instance_refresh_scheduler_spec.rb index 8f686a6998..37682ebb8f 100644 --- a/spec/workers/scheduler/instance_refresh_scheduler_spec.rb +++ b/spec/workers/scheduler/instance_refresh_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::InstanceRefreshScheduler do +RSpec.describe Scheduler::InstanceRefreshScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb b/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb index 50af030117..7071fa6e98 100644 --- a/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/ip_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::IpCleanupScheduler do +RSpec.describe Scheduler::IpCleanupScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/pghero_scheduler_spec.rb b/spec/workers/scheduler/pghero_scheduler_spec.rb index e404e5fe47..c99e5bb164 100644 --- a/spec/workers/scheduler/pghero_scheduler_spec.rb +++ b/spec/workers/scheduler/pghero_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::PgheroScheduler do +RSpec.describe Scheduler::PgheroScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb b/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb index 13c853c62a..2eeaeffe37 100644 --- a/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb +++ b/spec/workers/scheduler/scheduled_statuses_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::ScheduledStatusesScheduler do +RSpec.describe Scheduler::ScheduledStatusesScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/self_destruct_scheduler_spec.rb b/spec/workers/scheduler/self_destruct_scheduler_spec.rb index 2bf5783571..a79559efdd 100644 --- a/spec/workers/scheduler/self_destruct_scheduler_spec.rb +++ b/spec/workers/scheduler/self_destruct_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::SelfDestructScheduler do +RSpec.describe Scheduler::SelfDestructScheduler do let(:worker) { described_class.new } describe '#perform' do diff --git a/spec/workers/scheduler/software_update_check_scheduler_spec.rb b/spec/workers/scheduler/software_update_check_scheduler_spec.rb index f596c0a1ec..c88dbfe0af 100644 --- a/spec/workers/scheduler/software_update_check_scheduler_spec.rb +++ b/spec/workers/scheduler/software_update_check_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::SoftwareUpdateCheckScheduler do +RSpec.describe Scheduler::SoftwareUpdateCheckScheduler do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb b/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb index 25f0e1fce4..2782848e76 100644 --- a/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/suspended_user_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::SuspendedUserCleanupScheduler do +RSpec.describe Scheduler::SuspendedUserCleanupScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/trends/refresh_scheduler_spec.rb b/spec/workers/scheduler/trends/refresh_scheduler_spec.rb index c0c5f032bf..34bcd8fdd8 100644 --- a/spec/workers/scheduler/trends/refresh_scheduler_spec.rb +++ b/spec/workers/scheduler/trends/refresh_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::Trends::RefreshScheduler do +RSpec.describe Scheduler::Trends::RefreshScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb b/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb index cc971c24b4..ec35236172 100644 --- a/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb +++ b/spec/workers/scheduler/trends/review_notifications_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::Trends::ReviewNotificationsScheduler do +RSpec.describe Scheduler::Trends::ReviewNotificationsScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/scheduler/user_cleanup_scheduler_spec.rb b/spec/workers/scheduler/user_cleanup_scheduler_spec.rb index 7952f2c146..b1be7c4611 100644 --- a/spec/workers/scheduler/user_cleanup_scheduler_spec.rb +++ b/spec/workers/scheduler/user_cleanup_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::UserCleanupScheduler do +RSpec.describe Scheduler::UserCleanupScheduler do subject { described_class.new } let!(:new_unconfirmed_user) { Fabricate(:user) } diff --git a/spec/workers/scheduler/vacuum_scheduler_spec.rb b/spec/workers/scheduler/vacuum_scheduler_spec.rb index 36ecc93d8e..29a7eeac40 100644 --- a/spec/workers/scheduler/vacuum_scheduler_spec.rb +++ b/spec/workers/scheduler/vacuum_scheduler_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Scheduler::VacuumScheduler do +RSpec.describe Scheduler::VacuumScheduler do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/tag_unmerge_worker_spec.rb b/spec/workers/tag_unmerge_worker_spec.rb index 5d3a12c449..a0e53e36d9 100644 --- a/spec/workers/tag_unmerge_worker_spec.rb +++ b/spec/workers/tag_unmerge_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe TagUnmergeWorker do +RSpec.describe TagUnmergeWorker do subject { described_class.new } describe 'perform' do diff --git a/spec/workers/unfilter_notifications_worker_spec.rb b/spec/workers/unfilter_notifications_worker_spec.rb index 629eb644e4..464a4520ff 100644 --- a/spec/workers/unfilter_notifications_worker_spec.rb +++ b/spec/workers/unfilter_notifications_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnfilterNotificationsWorker do +RSpec.describe UnfilterNotificationsWorker do let(:recipient) { Fabricate(:account) } let(:sender) { Fabricate(:account) } diff --git a/spec/workers/unfollow_follow_worker_spec.rb b/spec/workers/unfollow_follow_worker_spec.rb index 8025b88c0c..7b9d49b902 100644 --- a/spec/workers/unfollow_follow_worker_spec.rb +++ b/spec/workers/unfollow_follow_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnfollowFollowWorker do +RSpec.describe UnfollowFollowWorker do subject { described_class.new } let(:local_follower) { Fabricate(:account) } diff --git a/spec/workers/unpublish_announcement_worker_spec.rb b/spec/workers/unpublish_announcement_worker_spec.rb index c742c30bce..f4838ac248 100644 --- a/spec/workers/unpublish_announcement_worker_spec.rb +++ b/spec/workers/unpublish_announcement_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe UnpublishAnnouncementWorker do +RSpec.describe UnpublishAnnouncementWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/verify_account_links_worker_spec.rb b/spec/workers/verify_account_links_worker_spec.rb index 227591392c..3f600b8c97 100644 --- a/spec/workers/verify_account_links_worker_spec.rb +++ b/spec/workers/verify_account_links_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe VerifyAccountLinksWorker do +RSpec.describe VerifyAccountLinksWorker do let(:worker) { described_class.new } describe 'perform' do diff --git a/spec/workers/web/push_notification_worker_spec.rb b/spec/workers/web/push_notification_worker_spec.rb index 637206a409..ced21d5bf7 100644 --- a/spec/workers/web/push_notification_worker_spec.rb +++ b/spec/workers/web/push_notification_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Web::PushNotificationWorker do +RSpec.describe Web::PushNotificationWorker do subject { described_class.new } let(:p256dh) { 'BN4GvZtEZiZuqFxSKVZfSfluwKBD7UxHNBmWkfiZfCtgDE8Bwh-_MtLXbBxTBAWH9r7IPKL0lhdcaqtL1dfxU5E=' } diff --git a/spec/workers/webhooks/delivery_worker_spec.rb b/spec/workers/webhooks/delivery_worker_spec.rb index 6a5483d1d4..48fcfc607b 100644 --- a/spec/workers/webhooks/delivery_worker_spec.rb +++ b/spec/workers/webhooks/delivery_worker_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe Webhooks::DeliveryWorker do +RSpec.describe Webhooks::DeliveryWorker do let(:worker) { described_class.new } describe '#perform' do