diff --git a/plugins/chat/spec/components/chat/mailer_spec.rb b/plugins/chat/spec/components/chat/mailer_spec.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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" do before do SiteSetting.chat_enabled = true diff --git a/plugins/chat/spec/integration/plugin_api_spec.rb b/plugins/chat/spec/integration/plugin_api_spec.rb index 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" do before { 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.rb index 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 do it "can successfully queue this job" do expect { 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.rb index 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 do let(: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.rb index 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 do fab!(: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.rb index 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 do subject(: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.rb index 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 do fab!(: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.rb index 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 do subject(: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.rb index 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 do base_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.rb index 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 do class FakeArchiveError < StandardError end diff --git a/plugins/chat/spec/lib/chat/duplicate_message_validator_spec.rb b/plugins/chat/spec/lib/chat/duplicate_message_validator_spec.rb index 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 do let(: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.rb index 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 do fab!(: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.rb index 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 do subject(: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.rb index 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 do fab!(: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.rb index 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 do subject(: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.rb index 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 do describe "#notify_new" do fab!(: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.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do subject(: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.rb index 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 do subject(: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.rb index 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 do describe "#process_text" do it "converts mrkdwn links to regular markdown" do diff --git a/plugins/chat/spec/lib/chat/transcript_service_spec.rb b/plugins/chat/spec/lib/chat/transcript_service_spec.rb index 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 do let(: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.rb index 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 do subject(: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.rb index 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 do describe ".messages" do fab!(: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.rb index 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 do describe ".create" do fab!(: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.rb index 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 do describe ".update_title" do fab!(:thread_1) { Fabricate(:chat_thread) } diff --git a/plugins/chat/spec/mailers/user_notifications_spec.rb b/plugins/chat/spec/mailers/user_notifications_spec.rb index 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 do fab!(: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.rb index 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 do it_behaves_like "a chatable model" do fab!(:chatable) { Fabricate(:category) } diff --git a/plugins/chat/spec/models/chat/direct_message_spec.rb b/plugins/chat/spec/models/chat/direct_message_spec.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do subject(: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.rb index 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 do subject(: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.rb index 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 do fab!(:moderator) fab!(:user) diff --git a/plugins/chat/spec/models/user_option_spec.rb b/plugins/chat/spec/models/user_option_spec.rb index 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 do describe "#chat_separate_sidebar_mode" do it "is present" do diff --git a/plugins/chat/spec/models/user_spec.rb b/plugins/chat/spec/models/user_spec.rb index 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 do it { 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.rb index 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 do before do SiteSetting.clean_up_uploads = true diff --git a/plugins/chat/spec/queries/chat/channel_memberships_query_spec.rb b/plugins/chat/spec/queries/chat/channel_memberships_query_spec.rb index 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 do fab!(: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.rb index 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 do subject(:query) do described_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.rb index 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 do subject(:query) do described_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.rb index 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 do fab!(: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.rb index 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 do describe "#export_messages" do fab!(:user) diff --git a/plugins/chat/spec/requests/application_controller_spec.rb b/plugins/chat/spec/requests/application_controller_spec.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do describe "#access_by_category" do fab!(: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.rb index 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 do fab!(: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.rb index 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 do fab!(:current_user) { Fabricate(:user) } fab!(:thread) do diff --git a/plugins/chat/spec/requests/chat/api/channel_threads_controller_spec.rb b/plugins/chat/spec/requests/chat/api/channel_threads_controller_spec.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do before do SiteSetting.chat_enabled = true diff --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.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do before do SiteSetting.chat_enabled = true diff --git a/plugins/chat/spec/requests/chat/api/current_user_channels_spec.rb b/plugins/chat/spec/requests/chat/api/current_user_channels_spec.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do fab!(: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.rb index 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 do describe "unsubscribing from chat email settings" do fab!(:user) diff --git a/plugins/chat/spec/requests/direct_messages_controller_spec.rb b/plugins/chat/spec/requests/direct_messages_controller_spec.rb index 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 do fab!(:user) fab!(:user1) { Fabricate(:user) } diff --git a/plugins/chat/spec/requests/emojis_controller_spec.rb b/plugins/chat/spec/requests/emojis_controller_spec.rb index 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 do fab!(: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.rb index 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 do subject(: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.rb index 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 do subject(: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.rb index 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 do subject(:serializer) do user = 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.rb index 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 do subject(: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.rb index 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 do context "with status" do fab!(: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.rb index 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 do describe "#user" do it "returns you when there are two of us" do diff --git a/plugins/chat/spec/serializer/chat/in_reply_to_serializer_spec.rb b/plugins/chat/spec/serializer/chat/in_reply_to_serializer_spec.rb index 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 do subject(: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.rb index 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 do describe "#user" do fab!(: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.rb index 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 do describe Chat::AutoJoinChannelBatch::Contract, type: :model do subject(: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.rb index 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 do fab!(: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.rb index 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 do fab!(:channel) { Fabricate(:category_channel) } diff --git a/plugins/checklist/spec/pretty_text_spec.rb b/plugins/checklist/spec/pretty_text_spec.rb index 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 do describe "markdown it" do it "can properly bake boxes" do diff --git a/plugins/discourse-details/spec/components/pretty_text_spec.rb b/plugins/discourse-details/spec/components/pretty_text_spec.rb index 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 do diff --git a/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rb b/plugins/discourse-lazy-videos/spec/components/pretty_text_spec.rb index 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 do diff --git a/plugins/footnote/spec/pretty_text_spec.rb b/plugins/footnote/spec/pretty_text_spec.rb index 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 do before { Jobs.run_immediately! } diff --git a/plugins/poll/spec/controllers/polls_controller_spec.rb b/plugins/poll/spec/controllers/polls_controller_spec.rb index 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 do routes { ::DiscoursePoll::Engine.routes } diff --git a/plugins/poll/spec/controllers/posts_controller_spec.rb b/plugins/poll/spec/controllers/posts_controller_spec.rb index 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 do let!(: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.rb index 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" do describe "fetch voters for a poll" do fab!(:user) diff --git a/plugins/poll/spec/jobs/regular/close_poll_spec.rb b/plugins/poll/spec/jobs/regular/close_poll_spec.rb index 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 do let(: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.rb index 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 do let(: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.rb index 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 do subject(:validator) { described_class.new(post) } diff --git a/plugins/poll/spec/requests/posts_controller_spec.rb b/plugins/poll/spec/requests/posts_controller_spec.rb index 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 do let(:admin) { Fabricate(:admin) } diff --git a/plugins/poll/spec/requests/users_controller_spec.rb b/plugins/poll/spec/requests/users_controller_spec.rb index 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 do let(:admin) { Fabricate(:admin) } diff --git a/plugins/spoiler-alert/spec/pretty_text_spec.rb b/plugins/spoiler-alert/spec/pretty_text_spec.rb index 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 do let(:post) { Fabricate(:post) } diff --git a/plugins/spoiler-alert/spec/topic_excerpt_spec.rb b/plugins/spoiler-alert/spec/topic_excerpt_spec.rb index 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 do it "should remove spoilers from excerpts" do expect( 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.rb index 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.rb index 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.rb index 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 do subject(: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.rb index 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 do fab!(:post) diff --git a/spec/jobs/sync_acls_for_uploads_spec.rb b/spec/jobs/sync_acls_for_uploads_spec.rb index 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 do let(: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.rb index 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 do subject(:validator) { described_class.new } diff --git a/spec/models/badge_grouping_spec.rb b/spec/models/badge_grouping_spec.rb index 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 do it { 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.rb index 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 do it "can't have duplicate names" do Fabricate(:form_template, name: "Bug Report", template: "- type: input\n id: name") diff --git a/spec/models/sitemap_spec.rb b/spec/models/sitemap_spec.rb index 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 do describe ".regenerate_sitemaps" do fab!(:topic) diff --git a/spec/requests/sitemap_controller_spec.rb b/spec/requests/sitemap_controller_spec.rb index 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 do describe "before_action :check_sitemap_enabled" do it "returns a 404 if sitemap is disabled" do diff --git a/spec/services/post_bookmarkable_spec.rb b/spec/services/post_bookmarkable_spec.rb index 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 do subject(:registered_bookmarkable) { RegisteredBookmarkable.new(PostBookmarkable) } diff --git a/spec/services/topic_bookmarkable_spec.rb b/spec/services/topic_bookmarkable_spec.rb index 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 do subject(:registered_bookmarkable) { RegisteredBookmarkable.new(TopicBookmarkable) } diff --git a/spec/views/list/list.erb_spec.rb b/spec/views/list/list.erb_spec.rb index 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" do fab!(:category) fab!(:topic) diff --git a/spec/views/topics/show.html.erb_spec.rb b/spec/views/topics/show.html.erb_spec.rb index 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