A platform for community discussion. Free, open, simple.
DEV: Remove unnecessary rails_helper requiring (#26364)
Jarek Radosz4c860995e04b
diff --git a/plugins/chat/spec/components/chat/mailer_spec.rb b/plugins/chat/spec/components/chat/mailer_spec.rbindex 5a66196f39c..86969c4e86a 100644--- a/plugins/chat/spec/components/chat/mailer_spec.rb+++ b/plugins/chat/spec/components/chat/mailer_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Mailer dofab!(:chatters_group) { Fabricate(:group) }fab!(:sender) { Fabricate(:user, group_ids: [chatters_group.id], refresh_auto_groups: true) }diff --git a/plugins/chat/spec/components/chat/message_rate_limiter_spec.rb b/plugins/chat/spec/components/chat/message_rate_limiter_spec.rbindex 50d394ffa33..07d3a989ead 100644--- a/plugins/chat/spec/components/chat/message_rate_limiter_spec.rb+++ b/plugins/chat/spec/components/chat/message_rate_limiter_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::MessageRateLimiter dofab!(:user) { Fabricate(:user, trust_level: 3) }let(:limiter) { described_class.new(user) }diff --git a/plugins/chat/spec/components/chat/seeder_spec.rb b/plugins/chat/spec/components/chat/seeder_spec.rbindex f0ee8d1faac..3b99a77fc23 100644--- a/plugins/chat/spec/components/chat/seeder_spec.rb+++ b/plugins/chat/spec/components/chat/seeder_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Seeder dofab!(:staff_category) { Fabricate(:private_category, name: "Staff", group: Group[:staff]) }fab!(:general_category) { Fabricate(:category, name: "General") }diff --git a/plugins/chat/spec/integration/custom_api_key_scopes_spec.rb b/plugins/chat/spec/integration/custom_api_key_scopes_spec.rbindex 79eb5a87139..5d41ed372c0 100644--- a/plugins/chat/spec/integration/custom_api_key_scopes_spec.rb+++ b/plugins/chat/spec/integration/custom_api_key_scopes_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe "API keys scoped to chat#create_message" dobefore doSiteSetting.chat_enabled = truediff --git a/plugins/chat/spec/integration/plugin_api_spec.rb b/plugins/chat/spec/integration/plugin_api_spec.rbindex a329d906824..070336a3e22 100644--- a/plugins/chat/spec/integration/plugin_api_spec.rb+++ b/plugins/chat/spec/integration/plugin_api_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe "Plugin API for chat" dobefore { SiteSetting.chat_enabled = true }diff --git a/plugins/chat/spec/jobs/regular/chat/auto_join_channel_batch_spec.rb b/plugins/chat/spec/jobs/regular/chat/auto_join_channel_batch_spec.rbindex fa8d7534ef9..68248bbbfe3 100644--- a/plugins/chat/spec/jobs/regular/chat/auto_join_channel_batch_spec.rb+++ b/plugins/chat/spec/jobs/regular/chat/auto_join_channel_batch_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Jobs::Chat::AutoJoinChannelBatch doit "can successfully queue this job" doexpect {diff --git a/plugins/chat/spec/jobs/regular/chat/auto_join_channel_memberships_spec.rb b/plugins/chat/spec/jobs/regular/chat/auto_join_channel_memberships_spec.rbindex bfb6cacfd02..74a5f83de54 100644--- a/plugins/chat/spec/jobs/regular/chat/auto_join_channel_memberships_spec.rb+++ b/plugins/chat/spec/jobs/regular/chat/auto_join_channel_memberships_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Jobs::Chat::AutoJoinChannelMemberships dolet(:user) { Fabricate(:user, last_seen_at: 15.minutes.ago) }let(:category) { Fabricate(:category, user: user) }diff --git a/plugins/chat/spec/jobs/regular/chat/channel_archive_spec.rb b/plugins/chat/spec/jobs/regular/chat/channel_archive_spec.rbindex d5602dda385..0e2a3746c6e 100644--- a/plugins/chat/spec/jobs/regular/chat/channel_archive_spec.rb+++ b/plugins/chat/spec/jobs/regular/chat/channel_archive_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Jobs::Chat::ChannelArchive dofab!(:chat_channel) { Fabricate(:category_channel) }fab!(:user) { Fabricate(:user, admin: true) }diff --git a/plugins/chat/spec/jobs/regular/chat/notify_mentioned_spec.rb b/plugins/chat/spec/jobs/regular/chat/notify_mentioned_spec.rbindex 42278706206..f1238562ecb 100644--- a/plugins/chat/spec/jobs/regular/chat/notify_mentioned_spec.rb+++ b/plugins/chat/spec/jobs/regular/chat/notify_mentioned_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Jobs::Chat::NotifyMentioned dosubject(:job) { described_class.new }diff --git a/plugins/chat/spec/jobs/regular/chat/process_message_spec.rb b/plugins/chat/spec/jobs/regular/chat/process_message_spec.rbindex 1e59252d3c6..6e33ce76ce3 100644--- a/plugins/chat/spec/jobs/regular/chat/process_message_spec.rb+++ b/plugins/chat/spec/jobs/regular/chat/process_message_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Jobs::Chat::ProcessMessage dofab!(:chat_message) { Fabricate(:chat_message, message: "https://discourse.org/team") }diff --git a/plugins/chat/spec/jobs/scheduled/auto_join_users_spec.rb b/plugins/chat/spec/jobs/scheduled/auto_join_users_spec.rbindex 4abbdc37405..066c56302a4 100644--- a/plugins/chat/spec/jobs/scheduled/auto_join_users_spec.rb+++ b/plugins/chat/spec/jobs/scheduled/auto_join_users_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Jobs::Chat::AutoJoinUsers dosubject(:job) { described_class.new }diff --git a/plugins/chat/spec/jobs/scheduled/delete_old_chat_messages_spec.rb b/plugins/chat/spec/jobs/scheduled/delete_old_chat_messages_spec.rbindex d812460bac3..d40db4a5641 100644--- a/plugins/chat/spec/jobs/scheduled/delete_old_chat_messages_spec.rb+++ b/plugins/chat/spec/jobs/scheduled/delete_old_chat_messages_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Jobs::Chat::DeleteOldMessages dobase_date = DateTime.parse("2020-12-01 00:00 UTC")diff --git a/plugins/chat/spec/lib/chat/channel_archive_service_spec.rb b/plugins/chat/spec/lib/chat/channel_archive_service_spec.rbindex 96451f3480c..7897c52d169 100644--- a/plugins/chat/spec/lib/chat/channel_archive_service_spec.rb+++ b/plugins/chat/spec/lib/chat/channel_archive_service_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::ChannelArchiveService doclass FakeArchiveError < StandardErrorenddiff --git a/plugins/chat/spec/lib/chat/duplicate_message_validator_spec.rb b/plugins/chat/spec/lib/chat/duplicate_message_validator_spec.rbindex 4da4da7bddf..03f94e3cc47 100644--- a/plugins/chat/spec/lib/chat/duplicate_message_validator_spec.rb+++ b/plugins/chat/spec/lib/chat/duplicate_message_validator_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::DuplicateMessageValidator dolet(:chat_channel) { Fabricate(:chat_channel) }diff --git a/plugins/chat/spec/lib/chat/guardian_extensions_spec.rb b/plugins/chat/spec/lib/chat/guardian_extensions_spec.rbindex 3fc43616d5b..b392fc15dfc 100644--- a/plugins/chat/spec/lib/chat/guardian_extensions_spec.rb+++ b/plugins/chat/spec/lib/chat/guardian_extensions_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::GuardianExtensions dofab!(:chatters) { Fabricate(:group) }fab!(:user) { Fabricate(:user, group_ids: [chatters.id], refresh_auto_groups: true) }diff --git a/plugins/chat/spec/lib/chat/message_bookmarkable_spec.rb b/plugins/chat/spec/lib/chat/message_bookmarkable_spec.rbindex 5ae37107ea0..98a866bf699 100644--- a/plugins/chat/spec/lib/chat/message_bookmarkable_spec.rb+++ b/plugins/chat/spec/lib/chat/message_bookmarkable_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::MessageBookmarkable dosubject(:registered_bookmarkable) { RegisteredBookmarkable.new(described_class) }diff --git a/plugins/chat/spec/lib/chat/message_mover_spec.rb b/plugins/chat/spec/lib/chat/message_mover_spec.rbindex 754d6370c82..197109a7010 100644--- a/plugins/chat/spec/lib/chat/message_mover_spec.rb+++ b/plugins/chat/spec/lib/chat/message_mover_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::MessageMover dofab!(:acting_user) { Fabricate(:admin, username: "testmovechat") }fab!(:source_channel) { Fabricate(:category_channel) }diff --git a/plugins/chat/spec/lib/chat/message_reactor_spec.rb b/plugins/chat/spec/lib/chat/message_reactor_spec.rbindex 6efe970e746..f52b5619dcb 100644--- a/plugins/chat/spec/lib/chat/message_reactor_spec.rb+++ b/plugins/chat/spec/lib/chat/message_reactor_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::MessageReactor dosubject(:message_reactor) { described_class.new(reacting_user, channel) }diff --git a/plugins/chat/spec/lib/chat/notifier_spec.rb b/plugins/chat/spec/lib/chat/notifier_spec.rbindex 092d5fc9112..e8f5df4a49e 100644--- a/plugins/chat/spec/lib/chat/notifier_spec.rb+++ b/plugins/chat/spec/lib/chat/notifier_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Notifier dodescribe "#notify_new" dofab!(:channel) { Fabricate(:category_channel) }diff --git a/plugins/chat/spec/lib/chat/onebox_handler_spec.rb b/plugins/chat/spec/lib/chat/onebox_handler_spec.rbindex 2b1bafd4bd3..454eea32396 100644--- a/plugins/chat/spec/lib/chat/onebox_handler_spec.rb+++ b/plugins/chat/spec/lib/chat/onebox_handler_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::OneboxHandler dofab!(:private_category) { Fabricate(:private_category, group: Fabricate(:group)) }fab!(:private_channel) { Fabricate(:category_channel, chatable: private_category) }diff --git a/plugins/chat/spec/lib/chat/parsed_mentions_spec.rb b/plugins/chat/spec/lib/chat/parsed_mentions_spec.rbindex be894fb8eb6..302258b67b4 100644--- a/plugins/chat/spec/lib/chat/parsed_mentions_spec.rb+++ b/plugins/chat/spec/lib/chat/parsed_mentions_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::ParsedMentions dofab!(:channel_member_1) { Fabricate(:user) }fab!(:channel_member_2) { Fabricate(:user) }diff --git a/plugins/chat/spec/lib/chat/post_notification_handler_spec.rb b/plugins/chat/spec/lib/chat/post_notification_handler_spec.rbindex 47705958594..21a1891b749 100644--- a/plugins/chat/spec/lib/chat/post_notification_handler_spec.rb+++ b/plugins/chat/spec/lib/chat/post_notification_handler_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::PostNotificationHandler dosubject(:handler) { described_class.new(post, notified_users) }diff --git a/plugins/chat/spec/lib/chat/review_queue_spec.rb b/plugins/chat/spec/lib/chat/review_queue_spec.rbindex ffc9ddd2702..4a15f54fb3f 100644--- a/plugins/chat/spec/lib/chat/review_queue_spec.rb+++ b/plugins/chat/spec/lib/chat/review_queue_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::ReviewQueue dosubject(:queue) { described_class.new }diff --git a/plugins/chat/spec/lib/chat/slack_compatibility_spec.rb b/plugins/chat/spec/lib/chat/slack_compatibility_spec.rbindex 1e8c550f085..bf0f5b2f054 100644--- a/plugins/chat/spec/lib/chat/slack_compatibility_spec.rb+++ b/plugins/chat/spec/lib/chat/slack_compatibility_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::SlackCompatibility dodescribe "#process_text" doit "converts mrkdwn links to regular markdown" dodiff --git a/plugins/chat/spec/lib/chat/transcript_service_spec.rb b/plugins/chat/spec/lib/chat/transcript_service_spec.rbindex 3d20bbc4307..edebd90dde5 100644--- a/plugins/chat/spec/lib/chat/transcript_service_spec.rb+++ b/plugins/chat/spec/lib/chat/transcript_service_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::TranscriptService dolet(:acting_user) { Fabricate(:user) }let(:user1) { Fabricate(:user, username: "martinchat") }diff --git a/plugins/chat/spec/lib/chat/types/array_spec.rb b/plugins/chat/spec/lib/chat/types/array_spec.rbindex 8850e18ae9e..8ffc96074b8 100644--- a/plugins/chat/spec/lib/chat/types/array_spec.rb+++ b/plugins/chat/spec/lib/chat/types/array_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Types::Array dosubject(:type) { described_class.new }diff --git a/plugins/chat/spec/lib/chat_sdk/channel_spec.rb b/plugins/chat/spec/lib/chat_sdk/channel_spec.rbindex fa99218ef2b..8bcac2f7484 100644--- a/plugins/chat/spec/lib/chat_sdk/channel_spec.rb+++ b/plugins/chat/spec/lib/chat_sdk/channel_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe ChatSDK::Channel dodescribe ".messages" dofab!(:channel_1) { Fabricate(:chat_channel) }diff --git a/plugins/chat/spec/lib/chat_sdk/message_spec.rb b/plugins/chat/spec/lib/chat_sdk/message_spec.rbindex c1ca1172548..d2cc3c8cd4b 100644--- a/plugins/chat/spec/lib/chat_sdk/message_spec.rb+++ b/plugins/chat/spec/lib/chat_sdk/message_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe ChatSDK::Message dodescribe ".create" dofab!(:channel_1) { Fabricate(:chat_channel) }diff --git a/plugins/chat/spec/lib/chat_sdk/thread_spec.rb b/plugins/chat/spec/lib/chat_sdk/thread_spec.rbindex 0cf9653ab69..570c21836f7 100644--- a/plugins/chat/spec/lib/chat_sdk/thread_spec.rb+++ b/plugins/chat/spec/lib/chat_sdk/thread_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe ChatSDK::Thread dodescribe ".update_title" dofab!(:thread_1) { Fabricate(:chat_thread) }diff --git a/plugins/chat/spec/mailers/user_notifications_spec.rb b/plugins/chat/spec/mailers/user_notifications_spec.rbindex 4a2cf329bee..6b45609fcbd 100644--- a/plugins/chat/spec/mailers/user_notifications_spec.rb+++ b/plugins/chat/spec/mailers/user_notifications_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe UserNotifications dofab!(:chatters_group) { Fabricate(:group) }fab!(:sender) { Fabricate(:user, group_ids: [chatters_group.id], refresh_auto_groups: true) }diff --git a/plugins/chat/spec/models/category_spec.rb b/plugins/chat/spec/models/category_spec.rbindex d02d3036524..e6987851b50 100644--- a/plugins/chat/spec/models/category_spec.rb+++ b/plugins/chat/spec/models/category_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Category doit_behaves_like "a chatable model" dofab!(:chatable) { Fabricate(:category) }diff --git a/plugins/chat/spec/models/chat/direct_message_spec.rb b/plugins/chat/spec/models/chat/direct_message_spec.rbindex 037b1c2bbfc..3812d41d827 100644--- a/plugins/chat/spec/models/chat/direct_message_spec.rb+++ b/plugins/chat/spec/models/chat/direct_message_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::DirectMessage dofab!(:user1) { Fabricate(:user, username: "chatdmfellow1") }fab!(:user2) { Fabricate(:user, username: "chatdmuser") }diff --git a/plugins/chat/spec/models/chat/message_spec.rb b/plugins/chat/spec/models/chat/message_spec.rbindex 20d12d96ec1..9cf725caab9 100644--- a/plugins/chat/spec/models/chat/message_spec.rb+++ b/plugins/chat/spec/models/chat/message_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Message dofab!(:message) { Fabricate(:chat_message, message: "hey friend, what's up?!") }diff --git a/plugins/chat/spec/models/chat/null_message_spec.rb b/plugins/chat/spec/models/chat/null_message_spec.rbindex 52926cbd320..0a3b92425e2 100644--- a/plugins/chat/spec/models/chat/null_message_spec.rb+++ b/plugins/chat/spec/models/chat/null_message_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::NullMessage dosubject(:null_message) { described_class.new }diff --git a/plugins/chat/spec/models/chat/null_user_spec.rb b/plugins/chat/spec/models/chat/null_user_spec.rbindex dd825900b57..1e62316cf98 100644--- a/plugins/chat/spec/models/chat/null_user_spec.rb+++ b/plugins/chat/spec/models/chat/null_user_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::NullUser dosubject(:null_user) { described_class.new }diff --git a/plugins/chat/spec/models/chat/reviewable_chat_message_spec.rb b/plugins/chat/spec/models/chat/reviewable_chat_message_spec.rbindex 1ef8d8a0fa6..ce7a5b46f0e 100644--- a/plugins/chat/spec/models/chat/reviewable_chat_message_spec.rb+++ b/plugins/chat/spec/models/chat/reviewable_chat_message_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::ReviewableMessage, type: :model dofab!(:moderator)fab!(:user)diff --git a/plugins/chat/spec/models/user_option_spec.rb b/plugins/chat/spec/models/user_option_spec.rbindex 481f7e3b55c..bcf05ae88e9 100644--- a/plugins/chat/spec/models/user_option_spec.rb+++ b/plugins/chat/spec/models/user_option_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe UserOption dodescribe "#chat_separate_sidebar_mode" doit "is present" dodiff --git a/plugins/chat/spec/models/user_spec.rb b/plugins/chat/spec/models/user_spec.rbindex 9d02f0701d1..efd67f89124 100644--- a/plugins/chat/spec/models/user_spec.rb+++ b/plugins/chat/spec/models/user_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe User doit { is_expected.to have_many(:user_chat_channel_memberships).dependent(:destroy) }it { is_expected.to have_many(:chat_message_reactions).dependent(:destroy) }diff --git a/plugins/chat/spec/plugin_spec.rb b/plugins/chat/spec/plugin_spec.rbindex 8a011e82321..71664b5b93b 100644--- a/plugins/chat/spec/plugin_spec.rb+++ b/plugins/chat/spec/plugin_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat dobefore doSiteSetting.clean_up_uploads = truediff --git a/plugins/chat/spec/queries/chat/channel_memberships_query_spec.rb b/plugins/chat/spec/queries/chat/channel_memberships_query_spec.rbindex 30d4e818e27..6af032ea274 100644--- a/plugins/chat/spec/queries/chat/channel_memberships_query_spec.rb+++ b/plugins/chat/spec/queries/chat/channel_memberships_query_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::ChannelMembershipsQuery dofab!(:user_1) { Fabricate(:user, username: "Aline", name: "Boetie") }fab!(:user_2) { Fabricate(:user, username: "Bertrand", name: "Arlan") }diff --git a/plugins/chat/spec/queries/chat/channel_unreads_query_spec.rb b/plugins/chat/spec/queries/chat/channel_unreads_query_spec.rbindex 38da4fba08e..fbb0089ce5c 100644--- a/plugins/chat/spec/queries/chat/channel_unreads_query_spec.rb+++ b/plugins/chat/spec/queries/chat/channel_unreads_query_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::ChannelUnreadsQuery dosubject(:query) dodescribed_class.call(diff --git a/plugins/chat/spec/queries/chat/thread_unreads_query_spec.rb b/plugins/chat/spec/queries/chat/thread_unreads_query_spec.rbindex 7244bab2e5b..0beb4e2a376 100644--- a/plugins/chat/spec/queries/chat/thread_unreads_query_spec.rb+++ b/plugins/chat/spec/queries/chat/thread_unreads_query_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::ThreadUnreadsQuery dosubject(:query) dodescribed_class.call(diff --git a/plugins/chat/spec/queries/chat/users_from_usernames_and_groups_query_spec.rb b/plugins/chat/spec/queries/chat/users_from_usernames_and_groups_query_spec.rbindex 60d3a2c7402..99b6c05e9b3 100644--- a/plugins/chat/spec/queries/chat/users_from_usernames_and_groups_query_spec.rb+++ b/plugins/chat/spec/queries/chat/users_from_usernames_and_groups_query_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::UsersFromUsernamesAndGroupsQuery dofab!(:user1) { Fabricate(:user) }fab!(:user2) { Fabricate(:user) }diff --git a/plugins/chat/spec/requests/admin/export_controller_spec.rb b/plugins/chat/spec/requests/admin/export_controller_spec.rbindex 5da5c3ec17b..8dd0d9392f9 100644--- a/plugins/chat/spec/requests/admin/export_controller_spec.rb+++ b/plugins/chat/spec/requests/admin/export_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::ChatController dodescribe "#export_messages" dofab!(:user)diff --git a/plugins/chat/spec/requests/application_controller_spec.rb b/plugins/chat/spec/requests/application_controller_spec.rbindex a797b9675c7..9d52cefc457 100644--- a/plugins/chat/spec/requests/application_controller_spec.rb+++ b/plugins/chat/spec/requests/application_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe ApplicationController dofab!(:user)fab!(:admin)diff --git a/plugins/chat/spec/requests/chat/admin/incoming_webhooks_controller_spec.rb b/plugins/chat/spec/requests/chat/admin/incoming_webhooks_controller_spec.rbindex f713689ac73..3152d05eb0b 100644--- a/plugins/chat/spec/requests/chat/admin/incoming_webhooks_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/admin/incoming_webhooks_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Admin::IncomingWebhooksController dofab!(:admin)fab!(:user)diff --git a/plugins/chat/spec/requests/chat/api/category_chatables_controller_spec.rb b/plugins/chat/spec/requests/chat/api/category_chatables_controller_spec.rbindex 773efff931c..a65a5c574f3 100644--- a/plugins/chat/spec/requests/chat/api/category_chatables_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/category_chatables_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Api::CategoryChatablesController dodescribe "#access_by_category" dofab!(:group)diff --git a/plugins/chat/spec/requests/chat/api/channel_messages_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channel_messages_controller_spec.rbindex 6f1393fdab5..4752dd99d6d 100644--- a/plugins/chat/spec/requests/chat/api/channel_messages_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channel_messages_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChannelMessagesController dofab!(:current_user) { Fabricate(:user) }fab!(:channel) { Fabricate(:chat_channel) }diff --git a/plugins/chat/spec/requests/chat/api/channel_thread_messages_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channel_thread_messages_controller_spec.rbindex 0e5c38b9299..4923b34d20c 100644--- a/plugins/chat/spec/requests/chat/api/channel_thread_messages_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channel_thread_messages_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChannelThreadMessagesController dofab!(:current_user) { Fabricate(:user) }fab!(:thread) dodiff --git a/plugins/chat/spec/requests/chat/api/channel_threads_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channel_threads_controller_spec.rbindex 6c2a432d951..039a2c52ad7 100644--- a/plugins/chat/spec/requests/chat/api/channel_threads_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channel_threads_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChannelThreadsController dofab!(:current_user) { Fabricate(:user) }fab!(:public_channel) { Fabricate(:chat_channel, threading_enabled: true) }diff --git a/plugins/chat/spec/requests/chat/api/channels_archives_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channels_archives_controller_spec.rbindex 0bb71ee9ab4..8582f3944d3 100644--- a/plugins/chat/spec/requests/chat/api/channels_archives_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channels_archives_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChannelsArchivesController dofab!(:user)fab!(:admin)diff --git a/plugins/chat/spec/requests/chat/api/channels_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channels_controller_spec.rbindex af901f43e7a..21786c170c6 100644--- a/plugins/chat/spec/requests/chat/api/channels_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channels_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChannelsController dobefore doSiteSetting.chat_enabled = truediff --git a/plugins/chat/spec/requests/chat/api/channels_current_user_membership_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channels_current_user_membership_controller_spec.rbindex da073edbfa7..da6b2f1f288 100644--- a/plugins/chat/spec/requests/chat/api/channels_current_user_membership_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channels_current_user_membership_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Api::ChannelsCurrentUserMembershipController dofab!(:current_user) { Fabricate(:user) }fab!(:channel_1) { Fabricate(:category_channel) }diff --git a/plugins/chat/spec/requests/chat/api/channels_current_user_membership_follows_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channels_current_user_membership_follows_controller_spec.rbindex bc440cf1a68..b581fb6986e 100644--- a/plugins/chat/spec/requests/chat/api/channels_current_user_membership_follows_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channels_current_user_membership_follows_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Api::ChannelsCurrentUserMembershipController dofab!(:current_user) { Fabricate(:user) }fab!(:channel_1) { Fabricate(:category_channel) }diff --git a/plugins/chat/spec/requests/chat/api/channels_invites_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channels_invites_controller_spec.rbindex 6b95d497077..e5128507b3c 100644--- a/plugins/chat/spec/requests/chat/api/channels_invites_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channels_invites_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChannelsInvitesController dofab!(:current_user) { Fabricate(:user) }fab!(:channel_1) { Fabricate(:chat_channel) }diff --git a/plugins/chat/spec/requests/chat/api/channels_messages_streaming_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channels_messages_streaming_controller_spec.rbindex 2fe19bda7c0..6170a36abc4 100644--- a/plugins/chat/spec/requests/chat/api/channels_messages_streaming_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channels_messages_streaming_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChannelsMessagesStreamingController dofab!(:channel_1) { Fabricate(:chat_channel) }fab!(:current_user) { Fabricate(:user) }diff --git a/plugins/chat/spec/requests/chat/api/channels_moves_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channels_moves_controller_spec.rbindex e110aa8bde6..ed2d6547cf1 100644--- a/plugins/chat/spec/requests/chat/api/channels_moves_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channels_moves_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChannelsMessagesMovesController dofab!(:channel) { Fabricate(:category_channel) }diff --git a/plugins/chat/spec/requests/chat/api/channels_status_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channels_status_controller_spec.rbindex d05a3d48ce7..0765690e79b 100644--- a/plugins/chat/spec/requests/chat/api/channels_status_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/channels_status_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChannelsStatusController dofab!(:channel_1) { Fabricate(:category_channel, status: :open) }diff --git a/plugins/chat/spec/requests/chat/api/chatables_controller_spec.rb b/plugins/chat/spec/requests/chat/api/chatables_controller_spec.rbindex 4b68d9a7935..58f1cb87197 100644--- a/plugins/chat/spec/requests/chat/api/chatables_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/api/chatables_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::Api::ChatablesController dobefore doSiteSetting.chat_enabled = truediff --git a/plugins/chat/spec/requests/chat/api/current_user_channels_spec.rb b/plugins/chat/spec/requests/chat/api/current_user_channels_spec.rbindex 107ef22f240..b1511604a84 100644--- a/plugins/chat/spec/requests/chat/api/current_user_channels_spec.rb+++ b/plugins/chat/spec/requests/chat/api/current_user_channels_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Api::CurrentUserChannelsController dofab!(:current_user) { Fabricate(:user) }diff --git a/plugins/chat/spec/requests/chat/api/current_user_threads_spec.rb b/plugins/chat/spec/requests/chat/api/current_user_threads_spec.rbindex 1e8577ba01f..0dc0230879e 100644--- a/plugins/chat/spec/requests/chat/api/current_user_threads_spec.rb+++ b/plugins/chat/spec/requests/chat/api/current_user_threads_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Api::CurrentUserThreadsController dofab!(:current_user) { Fabricate(:user) }diff --git a/plugins/chat/spec/requests/chat/incoming_webhooks_controller_spec.rb b/plugins/chat/spec/requests/chat/incoming_webhooks_controller_spec.rbindex 983a7ae6db6..d4326a5f208 100644--- a/plugins/chat/spec/requests/chat/incoming_webhooks_controller_spec.rb+++ b/plugins/chat/spec/requests/chat/incoming_webhooks_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::IncomingWebhooksController dofab!(:chat_channel) { Fabricate(:category_channel) }fab!(:webhook) { Fabricate(:incoming_chat_webhook, chat_channel: chat_channel) }diff --git a/plugins/chat/spec/requests/chat_controller_spec.rb b/plugins/chat/spec/requests/chat_controller_spec.rbindex 08d052f78d1..814eeec88f3 100644--- a/plugins/chat/spec/requests/chat_controller_spec.rb+++ b/plugins/chat/spec/requests/chat_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::ChatController dofab!(:user)fab!(:other_user) { Fabricate(:user) }diff --git a/plugins/chat/spec/requests/core_ext/email_controller_spec.rb b/plugins/chat/spec/requests/core_ext/email_controller_spec.rbindex 88cdd972085..a106318a840 100644--- a/plugins/chat/spec/requests/core_ext/email_controller_spec.rb+++ b/plugins/chat/spec/requests/core_ext/email_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe EmailController dodescribe "unsubscribing from chat email settings" dofab!(:user)diff --git a/plugins/chat/spec/requests/direct_messages_controller_spec.rb b/plugins/chat/spec/requests/direct_messages_controller_spec.rbindex e4f44632424..2616f2d25fd 100644--- a/plugins/chat/spec/requests/direct_messages_controller_spec.rb+++ b/plugins/chat/spec/requests/direct_messages_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::DirectMessagesController dofab!(:user)fab!(:user1) { Fabricate(:user) }diff --git a/plugins/chat/spec/requests/emojis_controller_spec.rb b/plugins/chat/spec/requests/emojis_controller_spec.rbindex e193411f7c0..54ca1d1394f 100644--- a/plugins/chat/spec/requests/emojis_controller_spec.rb+++ b/plugins/chat/spec/requests/emojis_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::EmojisController dofab!(:user_1) { Fabricate(:user) }diff --git a/plugins/chat/spec/serializer/chat/channel_serializer_spec.rb b/plugins/chat/spec/serializer/chat/channel_serializer_spec.rbindex caa7d579282..cce759adc4a 100644--- a/plugins/chat/spec/serializer/chat/channel_serializer_spec.rb+++ b/plugins/chat/spec/serializer/chat/channel_serializer_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::ChannelSerializer dosubject(:serializer) { described_class.new(chat_channel, scope: guardian, root: nil) }diff --git a/plugins/chat/spec/serializer/chat/chat_message_serializer_spec.rb b/plugins/chat/spec/serializer/chat/chat_message_serializer_spec.rbindex d4623631012..74e1c84634f 100644--- a/plugins/chat/spec/serializer/chat/chat_message_serializer_spec.rb+++ b/plugins/chat/spec/serializer/chat/chat_message_serializer_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::MessageSerializer dosubject(:serializer) { described_class.new(message_1, scope: guardian, root: nil) }diff --git a/plugins/chat/spec/serializer/chat/chat_message_user_serializer_spec.rb b/plugins/chat/spec/serializer/chat/chat_message_user_serializer_spec.rbindex 60614dbad38..d1906c81fbe 100644--- a/plugins/chat/spec/serializer/chat/chat_message_user_serializer_spec.rb+++ b/plugins/chat/spec/serializer/chat/chat_message_user_serializer_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::MessageUserSerializer dosubject(:serializer) douser = Fabricate(:user, **params)diff --git a/plugins/chat/spec/serializer/chat/chat_thread_original_message_serializer_spec.rb b/plugins/chat/spec/serializer/chat/chat_thread_original_message_serializer_spec.rbindex 9a9e37e85d6..bb58701c470 100644--- a/plugins/chat/spec/serializer/chat/chat_thread_original_message_serializer_spec.rb+++ b/plugins/chat/spec/serializer/chat/chat_thread_original_message_serializer_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::ThreadOriginalMessageSerializer dosubject(:serializer) { described_class.new(message_1, scope: guardian, root: nil) }diff --git a/plugins/chat/spec/serializer/chat/chatables_serializer_spec.rb b/plugins/chat/spec/serializer/chat/chatables_serializer_spec.rbindex 13ee8e0aebd..bb24f22d295 100644--- a/plugins/chat/spec/serializer/chat/chatables_serializer_spec.rb+++ b/plugins/chat/spec/serializer/chat/chatables_serializer_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::ChatablesSerializer docontext "with status" dofab!(:user_1) { Fabricate(:user) }diff --git a/plugins/chat/spec/serializer/chat/direct_message_serializer_spec.rb b/plugins/chat/spec/serializer/chat/direct_message_serializer_spec.rbindex 62166118d29..3908ebb7878 100644--- a/plugins/chat/spec/serializer/chat/direct_message_serializer_spec.rb+++ b/plugins/chat/spec/serializer/chat/direct_message_serializer_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::DirectMessageSerializer dodescribe "#user" doit "returns you when there are two of us" dodiff --git a/plugins/chat/spec/serializer/chat/in_reply_to_serializer_spec.rb b/plugins/chat/spec/serializer/chat/in_reply_to_serializer_spec.rbindex c775517962e..a2bb283d7cb 100644--- a/plugins/chat/spec/serializer/chat/in_reply_to_serializer_spec.rb+++ b/plugins/chat/spec/serializer/chat/in_reply_to_serializer_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::InReplyToSerializer dosubject(:serializer) { described_class.new(message, scope: guardian, root: nil) }diff --git a/plugins/chat/spec/serializer/chat/thread_original_message_serializer_spec.rb b/plugins/chat/spec/serializer/chat/thread_original_message_serializer_spec.rbindex 55a15503af6..10814e95cf0 100644--- a/plugins/chat/spec/serializer/chat/thread_original_message_serializer_spec.rb+++ b/plugins/chat/spec/serializer/chat/thread_original_message_serializer_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Chat::ThreadOriginalMessageSerializer dodescribe "#user" dofab!(:user_status) { Fabricate(:user_status) }diff --git a/plugins/chat/spec/services/chat/auto_join_channel_batch_spec.rb b/plugins/chat/spec/services/chat/auto_join_channel_batch_spec.rbindex fdc77b0e8c6..26f47d4ee68 100644--- a/plugins/chat/spec/services/chat/auto_join_channel_batch_spec.rb+++ b/plugins/chat/spec/services/chat/auto_join_channel_batch_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::AutoJoinChannelBatch dodescribe Chat::AutoJoinChannelBatch::Contract, type: :model dosubject(:contract) { described_class.new(start_user_id: 10) }diff --git a/plugins/chat/spec/services/chat/publisher_spec.rb b/plugins/chat/spec/services/chat/publisher_spec.rbindex 697ddf8f044..d8ce068c692 100644--- a/plugins/chat/spec/services/chat/publisher_spec.rb+++ b/plugins/chat/spec/services/chat/publisher_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::Publisher dofab!(:channel) { Fabricate(:category_channel) }fab!(:message_1) { Fabricate(:chat_message, chat_channel: channel) }diff --git a/plugins/chat/spec/validators/chat_default_channel_validator_spec.rb b/plugins/chat/spec/validators/chat_default_channel_validator_spec.rbindex 8622e1021b8..990666b7fdb 100644--- a/plugins/chat/spec/validators/chat_default_channel_validator_spec.rb+++ b/plugins/chat/spec/validators/chat_default_channel_validator_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Chat::DefaultChannelValidator dofab!(:channel) { Fabricate(:category_channel) }diff --git a/plugins/checklist/spec/pretty_text_spec.rb b/plugins/checklist/spec/pretty_text_spec.rbindex 27927932a2b..e37dc533d62 100644--- a/plugins/checklist/spec/pretty_text_spec.rb+++ b/plugins/checklist/spec/pretty_text_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe PrettyText dodescribe "markdown it" doit "can properly bake boxes" dodiff --git a/plugins/discourse-details/spec/components/pretty_text_spec.rb b/plugins/discourse-details/spec/components/pretty_text_spec.rbindex 20b84acfc79..3356f3a192a 100644--- a/plugins/discourse-details/spec/components/pretty_text_spec.rb+++ b/plugins/discourse-details/spec/components/pretty_text_spec.rb@@ -1,6 +1,5 @@# frozen_string_literal: true-require "rails_helper"require "pretty_text"RSpec.describe PrettyText dodiff --git a/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rb b/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rbindex e01c2ca5154..692f20a1240 100644--- a/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rb+++ b/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rb@@ -1,6 +1,5 @@# frozen_string_literal: true-require "rails_helper"require "pretty_text"RSpec.describe PrettyText dodiff --git a/plugins/footnote/spec/pretty_text_spec.rb b/plugins/footnote/spec/pretty_text_spec.rbindex bef850daef8..f1533f61dc2 100644--- a/plugins/footnote/spec/pretty_text_spec.rb+++ b/plugins/footnote/spec/pretty_text_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe PrettyText dobefore { Jobs.run_immediately! }diff --git a/plugins/poll/spec/controllers/polls_controller_spec.rb b/plugins/poll/spec/controllers/polls_controller_spec.rbindex d60938fe31d..a97a04209ca 100644--- a/plugins/poll/spec/controllers/polls_controller_spec.rb+++ b/plugins/poll/spec/controllers/polls_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe ::DiscoursePoll::PollsController doroutes { ::DiscoursePoll::Engine.routes }diff --git a/plugins/poll/spec/controllers/posts_controller_spec.rb b/plugins/poll/spec/controllers/posts_controller_spec.rbindex cf1051e8054..4ab0abc45f9 100644--- a/plugins/poll/spec/controllers/posts_controller_spec.rb+++ b/plugins/poll/spec/controllers/posts_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe PostsController dolet!(:user) { Fabricate(:user, refresh_auto_groups: true) }let!(:title) { "Testing Poll Plugin" }diff --git a/plugins/poll/spec/integration/poll_endpoints_spec.rb b/plugins/poll/spec/integration/poll_endpoints_spec.rbindex ad8fcd0d868..0e04d1b1ec5 100644--- a/plugins/poll/spec/integration/poll_endpoints_spec.rb+++ b/plugins/poll/spec/integration/poll_endpoints_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe "DiscoursePoll endpoints" dodescribe "fetch voters for a poll" dofab!(:user)diff --git a/plugins/poll/spec/jobs/regular/close_poll_spec.rb b/plugins/poll/spec/jobs/regular/close_poll_spec.rbindex 08734f9691f..54076935f17 100644--- a/plugins/poll/spec/jobs/regular/close_poll_spec.rb+++ b/plugins/poll/spec/jobs/regular/close_poll_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Jobs::ClosePoll dolet(:post) { Fabricate(:post, raw: "[poll]\n- A\n- B\n[/poll]") }diff --git a/plugins/poll/spec/lib/new_post_manager_spec.rb b/plugins/poll/spec/lib/new_post_manager_spec.rbindex cc9370bcff2..940aa1fda66 100644--- a/plugins/poll/spec/lib/new_post_manager_spec.rb+++ b/plugins/poll/spec/lib/new_post_manager_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe NewPostManager dolet(:user) { Fabricate(:newuser, refresh_auto_groups: true) }let(:admin) { Fabricate(:admin, refresh_auto_groups: true) }diff --git a/plugins/poll/spec/lib/polls_validator_spec.rb b/plugins/poll/spec/lib/polls_validator_spec.rbindex e337db78003..7d022f545cd 100644--- a/plugins/poll/spec/lib/polls_validator_spec.rb+++ b/plugins/poll/spec/lib/polls_validator_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe ::DiscoursePoll::PollsValidator dosubject(:validator) { described_class.new(post) }diff --git a/plugins/poll/spec/requests/posts_controller_spec.rb b/plugins/poll/spec/requests/posts_controller_spec.rbindex 8ec707779e9..33dc890eb39 100644--- a/plugins/poll/spec/requests/posts_controller_spec.rb+++ b/plugins/poll/spec/requests/posts_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe PostsController dolet(:admin) { Fabricate(:admin) }diff --git a/plugins/poll/spec/requests/users_controller_spec.rb b/plugins/poll/spec/requests/users_controller_spec.rbindex b1a01267297..b285f7279ed 100644--- a/plugins/poll/spec/requests/users_controller_spec.rb+++ b/plugins/poll/spec/requests/users_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Admin::UsersController dolet(:admin) { Fabricate(:admin) }diff --git a/plugins/spoiler-alert/spec/pretty_text_spec.rb b/plugins/spoiler-alert/spec/pretty_text_spec.rbindex 24baf26e56f..494c43f46c3 100644--- a/plugins/spoiler-alert/spec/pretty_text_spec.rb+++ b/plugins/spoiler-alert/spec/pretty_text_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe PrettyText dolet(:post) { Fabricate(:post) }diff --git a/plugins/spoiler-alert/spec/topic_excerpt_spec.rb b/plugins/spoiler-alert/spec/topic_excerpt_spec.rbindex a3b599ad7da..39ba1c86039 100644--- a/plugins/spoiler-alert/spec/topic_excerpt_spec.rb+++ b/plugins/spoiler-alert/spec/topic_excerpt_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe PrettyText doit "should remove spoilers from excerpts" doexpect(diff --git a/spec/generator/site_setting_move_to_groups_migrations_generator_spec.rb b/spec/generator/site_setting_move_to_groups_migrations_generator_spec.rbindex 8df3277d385..f564a1bc072 100644--- a/spec/generator/site_setting_move_to_groups_migrations_generator_spec.rb+++ b/spec/generator/site_setting_move_to_groups_migrations_generator_spec.rb@@ -1,6 +1,5 @@# frozen_string_literal: true-require "rails_helper"require "rails/generators"require "generators/site_setting_move_to_groups_migration/site_setting_move_to_groups_migration_generator"diff --git a/spec/generator/site_setting_rename_migrations_generator_spec.rb b/spec/generator/site_setting_rename_migrations_generator_spec.rbindex b8a9284a6e5..1af9ba127ef 100644--- a/spec/generator/site_setting_rename_migrations_generator_spec.rb+++ b/spec/generator/site_setting_rename_migrations_generator_spec.rb@@ -1,6 +1,5 @@# frozen_string_literal: true-require "rails_helper"require "rails/generators"require "generators/site_setting_rename_migration/site_setting_rename_migration_generator"diff --git a/spec/jobs/clean_up_tags_spec.rb b/spec/jobs/clean_up_tags_spec.rbindex ac6dc9b8d1e..3f3928185e3 100644--- a/spec/jobs/clean_up_tags_spec.rb+++ b/spec/jobs/clean_up_tags_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-describe Jobs::CleanUpTags dosubject(:job) { described_class.new }diff --git a/spec/jobs/regular/update_post_uploads_secure_status_spec.rb b/spec/jobs/regular/update_post_uploads_secure_status_spec.rbindex d310810ead4..8952bdc41ec 100644--- a/spec/jobs/regular/update_post_uploads_secure_status_spec.rb+++ b/spec/jobs/regular/update_post_uploads_secure_status_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Jobs::UpdatePostUploadsSecureStatus dofab!(:post)diff --git a/spec/jobs/sync_acls_for_uploads_spec.rb b/spec/jobs/sync_acls_for_uploads_spec.rbindex 8f28e27b268..b2bc37bc5c5 100644--- a/spec/jobs/sync_acls_for_uploads_spec.rb+++ b/spec/jobs/sync_acls_for_uploads_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Jobs::SyncAclsForUploads dolet(:upload1) { Fabricate(:upload) }let(:upload2) { Fabricate(:upload) }diff --git a/spec/lib/validators/form_template_yaml_validator_spec.rb b/spec/lib/validators/form_template_yaml_validator_spec.rbindex 305874c578e..b253fc3fb3d 100644--- a/spec/lib/validators/form_template_yaml_validator_spec.rb+++ b/spec/lib/validators/form_template_yaml_validator_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe FormTemplateYamlValidator, type: :validator dosubject(:validator) { described_class.new }diff --git a/spec/models/badge_grouping_spec.rb b/spec/models/badge_grouping_spec.rbindex 58b5dbdb343..26250388bf8 100644--- a/spec/models/badge_grouping_spec.rb+++ b/spec/models/badge_grouping_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe BadgeGrouping, type: :model doit { is_expected.to validate_length_of(:name).is_at_most(100) }it { is_expected.to validate_length_of(:description).is_at_most(500) }diff --git a/spec/models/form_template_spec.rb b/spec/models/form_template_spec.rbindex a0e8d3e0b85..ab1fc601aeb 100644--- a/spec/models/form_template_spec.rb+++ b/spec/models/form_template_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe FormTemplate, type: :model doit "can't have duplicate names" doFabricate(:form_template, name: "Bug Report", template: "- type: input\n id: name")diff --git a/spec/models/sitemap_spec.rb b/spec/models/sitemap_spec.rbindex 1972fd258e5..fb12a377f61 100644--- a/spec/models/sitemap_spec.rb+++ b/spec/models/sitemap_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe Sitemap dodescribe ".regenerate_sitemaps" dofab!(:topic)diff --git a/spec/requests/sitemap_controller_spec.rb b/spec/requests/sitemap_controller_spec.rbindex 308090c85c4..0a1d62771ec 100644--- a/spec/requests/sitemap_controller_spec.rb+++ b/spec/requests/sitemap_controller_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe SitemapController dodescribe "before_action :check_sitemap_enabled" doit "returns a 404 if sitemap is disabled" dodiff --git a/spec/services/post_bookmarkable_spec.rb b/spec/services/post_bookmarkable_spec.rbindex fec2fc41e43..3cfa354e041 100644--- a/spec/services/post_bookmarkable_spec.rb+++ b/spec/services/post_bookmarkable_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe PostBookmarkable dosubject(:registered_bookmarkable) { RegisteredBookmarkable.new(PostBookmarkable) }diff --git a/spec/services/topic_bookmarkable_spec.rb b/spec/services/topic_bookmarkable_spec.rbindex 05dc11dbbc9..6ee7fdadfe8 100644--- a/spec/services/topic_bookmarkable_spec.rb+++ b/spec/services/topic_bookmarkable_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe TopicBookmarkable dosubject(:registered_bookmarkable) { RegisteredBookmarkable.new(TopicBookmarkable) }diff --git a/spec/views/list/list.erb_spec.rb b/spec/views/list/list.erb_spec.rbindex 7fb4c297fcf..9233fd01691 100644--- a/spec/views/list/list.erb_spec.rb+++ b/spec/views/list/list.erb_spec.rb@@ -1,7 +1,5 @@# frozen_string_literal: true-require "rails_helper"-RSpec.describe "list/list.erb" dofab!(:category)fab!(:topic)diff --git a/spec/views/topics/show.html.erb_spec.rb b/spec/views/topics/show.html.erb_spec.rbindex 9b9ba061973..abf90657775 100644--- a/spec/views/topics/show.html.erb_spec.rb+++ b/spec/views/topics/show.html.erb_spec.rb@@ -1,6 +1,5 @@# frozen_string_literal: true-require "rails_helper"require "ostruct"RSpec.describe "topics/show.html.erb" do