diff --git a/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb b/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb
index 826b5f4f7a8..36aca1c50cb 100644
--- a/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb
+++ b/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'active_record/connection_adapters/postgresql_fallback_adapter'
diff --git a/spec/components/admin_confirmation_spec.rb b/spec/components/admin_confirmation_spec.rb
index 994ef9d18e9..a6efab96159 100644
--- a/spec/components/admin_confirmation_spec.rb
+++ b/spec/components/admin_confirmation_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'admin_confirmation'
require 'rails_helper'
diff --git a/spec/components/admin_user_index_query_spec.rb b/spec/components/admin_user_index_query_spec.rb
index d31e9b5d7d2..d2f0afd5f1b 100644
--- a/spec/components/admin_user_index_query_spec.rb
+++ b/spec/components/admin_user_index_query_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'admin_user_index_query'
diff --git a/spec/components/archetype_spec.rb b/spec/components/archetype_spec.rb
index dc8d20e02ee..6414980e7f1 100644
--- a/spec/components/archetype_spec.rb
+++ b/spec/components/archetype_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require 'archetype'
diff --git a/spec/components/auth/default_current_user_provider_spec.rb b/spec/components/auth/default_current_user_provider_spec.rb
index bf68a08ebd7..3027a16e86a 100644
--- a/spec/components/auth/default_current_user_provider_spec.rb
+++ b/spec/components/auth/default_current_user_provider_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'auth/default_current_user_provider'
diff --git a/spec/components/auth/facebook_authenticator_spec.rb b/spec/components/auth/facebook_authenticator_spec.rb
index 3cf67fcaac4..babac8feecc 100644
--- a/spec/components/auth/facebook_authenticator_spec.rb
+++ b/spec/components/auth/facebook_authenticator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Auth::FacebookAuthenticator do
diff --git a/spec/components/auth/github_authenticator_spec.rb b/spec/components/auth/github_authenticator_spec.rb
index 58002fb9c83..0e7264e5c83 100644
--- a/spec/components/auth/github_authenticator_spec.rb
+++ b/spec/components/auth/github_authenticator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
def auth_token_for(user)
diff --git a/spec/components/auth/google_oauth2_authenticator_spec.rb b/spec/components/auth/google_oauth2_authenticator_spec.rb
index 49bc007201f..19824c7535b 100644
--- a/spec/components/auth/google_oauth2_authenticator_spec.rb
+++ b/spec/components/auth/google_oauth2_authenticator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Auth::GoogleOAuth2Authenticator do
diff --git a/spec/components/auth/instagram_authenticator_spec.rb b/spec/components/auth/instagram_authenticator_spec.rb
index d8a30753bd0..2efd9822700 100644
--- a/spec/components/auth/instagram_authenticator_spec.rb
+++ b/spec/components/auth/instagram_authenticator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Auth::InstagramAuthenticator do
diff --git a/spec/components/auth/managed_authenticator_spec.rb b/spec/components/auth/managed_authenticator_spec.rb
index 2af82a25ad3..f29dd6c07b0 100644
--- a/spec/components/auth/managed_authenticator_spec.rb
+++ b/spec/components/auth/managed_authenticator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Auth::ManagedAuthenticator do
diff --git a/spec/components/auth/open_id_authenticator_spec.rb b/spec/components/auth/open_id_authenticator_spec.rb
index dd0847868cf..8656b13e098 100644
--- a/spec/components/auth/open_id_authenticator_spec.rb
+++ b/spec/components/auth/open_id_authenticator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Auth::OpenIdAuthenticator do
diff --git a/spec/components/auth/twitter_authenticator_spec.rb b/spec/components/auth/twitter_authenticator_spec.rb
index 208050cacf8..55d9e5f5498 100644
--- a/spec/components/auth/twitter_authenticator_spec.rb
+++ b/spec/components/auth/twitter_authenticator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Auth::TwitterAuthenticator do
diff --git a/spec/components/avatar_lookup_spec.rb b/spec/components/avatar_lookup_spec.rb
index 7cf86afd44e..0a592c6ded5 100644
--- a/spec/components/avatar_lookup_spec.rb
+++ b/spec/components/avatar_lookup_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require_dependency 'avatar_lookup'
diff --git a/spec/components/cache_spec.rb b/spec/components/cache_spec.rb
index 0d44360edf5..33c54a573b0 100644
--- a/spec/components/cache_spec.rb
+++ b/spec/components/cache_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'cache'
diff --git a/spec/components/category_badge_spec.rb b/spec/components/category_badge_spec.rb
index ac89883cd22..a5636c9df59 100644
--- a/spec/components/category_badge_spec.rb
+++ b/spec/components/category_badge_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'category_badge'
diff --git a/spec/components/common_passwords/common_passwords_spec.rb b/spec/components/common_passwords/common_passwords_spec.rb
index b78ebeec529..e05f5a2430d 100644
--- a/spec/components/common_passwords/common_passwords_spec.rb
+++ b/spec/components/common_passwords/common_passwords_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require_dependency "common_passwords/common_passwords"
diff --git a/spec/components/composer_messages_finder_spec.rb b/spec/components/composer_messages_finder_spec.rb
index fe0b774b945..ada5f1ed5d4 100644
--- a/spec/components/composer_messages_finder_spec.rb
+++ b/spec/components/composer_messages_finder_spec.rb
@@ -1,4 +1,6 @@
# encoding: utf-8
+# frozen_string_literal: true
+
require 'rails_helper'
require 'composer_messages_finder'
diff --git a/spec/components/concern/category_hashtag_spec.rb b/spec/components/concern/category_hashtag_spec.rb
index fd23b656988..29cf5579bf1 100644
--- a/spec/components/concern/category_hashtag_spec.rb
+++ b/spec/components/concern/category_hashtag_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe CategoryHashtag do
diff --git a/spec/components/concern/has_custom_fields_spec.rb b/spec/components/concern/has_custom_fields_spec.rb
index 61f342658fe..b08b75aef35 100644
--- a/spec/components/concern/has_custom_fields_spec.rb
+++ b/spec/components/concern/has_custom_fields_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe HasCustomFields do
diff --git a/spec/components/concern/has_search_data_spec.rb b/spec/components/concern/has_search_data_spec.rb
index 9c8b3728ef3..4bf0e9624ee 100644
--- a/spec/components/concern/has_search_data_spec.rb
+++ b/spec/components/concern/has_search_data_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe HasSearchData do
diff --git a/spec/components/concern/positionable_spec.rb b/spec/components/concern/positionable_spec.rb
index 4ab010a538e..395251d3988 100644
--- a/spec/components/concern/positionable_spec.rb
+++ b/spec/components/concern/positionable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe Positionable do
diff --git a/spec/components/concern/searchable_spec.rb b/spec/components/concern/searchable_spec.rb
index 5c55c7d1ff5..49726a68557 100644
--- a/spec/components/concern/searchable_spec.rb
+++ b/spec/components/concern/searchable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe Searchable do
diff --git a/spec/components/concern/second_factor_manager_spec.rb b/spec/components/concern/second_factor_manager_spec.rb
index 4e6dcd2e7ac..9875fc166a4 100644
--- a/spec/components/concern/second_factor_manager_spec.rb
+++ b/spec/components/concern/second_factor_manager_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe SecondFactorManager do
diff --git a/spec/components/content_buffer_spec.rb b/spec/components/content_buffer_spec.rb
index adb8222f5c7..dc5cee7f188 100644
--- a/spec/components/content_buffer_spec.rb
+++ b/spec/components/content_buffer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'content_buffer'
diff --git a/spec/components/cooked_post_processor_spec.rb b/spec/components/cooked_post_processor_spec.rb
index a6a28470225..8e742290db0 100644
--- a/spec/components/cooked_post_processor_spec.rb
+++ b/spec/components/cooked_post_processor_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "cooked_post_processor"
require "file_store/s3_store"
diff --git a/spec/components/crawler_detection_spec.rb b/spec/components/crawler_detection_spec.rb
index 7fff4e80cc2..f514f750412 100644
--- a/spec/components/crawler_detection_spec.rb
+++ b/spec/components/crawler_detection_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'crawler_detection'
diff --git a/spec/components/current_user_spec.rb b/spec/components/current_user_spec.rb
index e7631e59963..e1cf988a136 100644
--- a/spec/components/current_user_spec.rb
+++ b/spec/components/current_user_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'current_user'
diff --git a/spec/components/directory_helper_spec.rb b/spec/components/directory_helper_spec.rb
index 18b4384ca21..1792bfdf8df 100644
--- a/spec/components/directory_helper_spec.rb
+++ b/spec/components/directory_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'directory_helper'
diff --git a/spec/components/discourse_diff_spec.rb b/spec/components/discourse_diff_spec.rb
index b797920b2f0..a7aefc53fa0 100644
--- a/spec/components/discourse_diff_spec.rb
+++ b/spec/components/discourse_diff_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'discourse_diff'
diff --git a/spec/components/discourse_event_spec.rb b/spec/components/discourse_event_spec.rb
index 9a618565c28..3b867a31247 100644
--- a/spec/components/discourse_event_spec.rb
+++ b/spec/components/discourse_event_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'discourse_event'
diff --git a/spec/components/discourse_hub_spec.rb b/spec/components/discourse_hub_spec.rb
index d4e6a05a474..384995bff9c 100644
--- a/spec/components/discourse_hub_spec.rb
+++ b/spec/components/discourse_hub_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'discourse_hub'
diff --git a/spec/components/discourse_i18n_spec.rb b/spec/components/discourse_i18n_spec.rb
index 7635cf6fefc..19118eaeda4 100644
--- a/spec/components/discourse_i18n_spec.rb
+++ b/spec/components/discourse_i18n_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'i18n/backend/discourse_i18n'
require 'translation_override'
diff --git a/spec/components/discourse_plugin_registry_spec.rb b/spec/components/discourse_plugin_registry_spec.rb
index 207352877d7..f3c784eb3c2 100644
--- a/spec/components/discourse_plugin_registry_spec.rb
+++ b/spec/components/discourse_plugin_registry_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'discourse_plugin_registry'
diff --git a/spec/components/discourse_plugin_spec.rb b/spec/components/discourse_plugin_spec.rb
index 10843202267..b91ada89bed 100644
--- a/spec/components/discourse_plugin_spec.rb
+++ b/spec/components/discourse_plugin_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'discourse_plugin'
diff --git a/spec/components/discourse_redis_spec.rb b/spec/components/discourse_redis_spec.rb
index 565fdce9a73..e9a28b7d542 100644
--- a/spec/components/discourse_redis_spec.rb
+++ b/spec/components/discourse_redis_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe DiscourseRedis do
diff --git a/spec/components/discourse_spec.rb b/spec/components/discourse_spec.rb
index a272269f069..9299e8f1eb6 100644
--- a/spec/components/discourse_spec.rb
+++ b/spec/components/discourse_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'discourse'
diff --git a/spec/components/discourse_tagging_spec.rb b/spec/components/discourse_tagging_spec.rb
index 52b52fd95b3..fdb8b1131df 100644
--- a/spec/components/discourse_tagging_spec.rb
+++ b/spec/components/discourse_tagging_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
require 'discourse_tagging'
diff --git a/spec/components/discourse_updates_spec.rb b/spec/components/discourse_updates_spec.rb
index aa4a335c20c..ccdd45ac4da 100644
--- a/spec/components/discourse_updates_spec.rb
+++ b/spec/components/discourse_updates_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'discourse_updates'
diff --git a/spec/components/distributed_memoizer_spec.rb b/spec/components/distributed_memoizer_spec.rb
index 5639a6a30dd..d620542d56e 100644
--- a/spec/components/distributed_memoizer_spec.rb
+++ b/spec/components/distributed_memoizer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'distributed_memoizer'
diff --git a/spec/components/distributed_mutex_spec.rb b/spec/components/distributed_mutex_spec.rb
index 66a2cb57109..569c35eb90d 100644
--- a/spec/components/distributed_mutex_spec.rb
+++ b/spec/components/distributed_mutex_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'distributed_mutex'
diff --git a/spec/components/email/email_spec.rb b/spec/components/email/email_spec.rb
index fbdc3949478..03629935698 100644
--- a/spec/components/email/email_spec.rb
+++ b/spec/components/email/email_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'email'
diff --git a/spec/components/email/message_builder_spec.rb b/spec/components/email/message_builder_spec.rb
index 95cb5f4f971..57f055f3512 100644
--- a/spec/components/email/message_builder_spec.rb
+++ b/spec/components/email/message_builder_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'email/message_builder'
diff --git a/spec/components/email/processor_spec.rb b/spec/components/email/processor_spec.rb
index ef33fd7d8f8..17eb988c049 100644
--- a/spec/components/email/processor_spec.rb
+++ b/spec/components/email/processor_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "email/processor"
diff --git a/spec/components/email/receiver_spec.rb b/spec/components/email/receiver_spec.rb
index 1181867ce17..d3a89acb13b 100644
--- a/spec/components/email/receiver_spec.rb
+++ b/spec/components/email/receiver_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "email/receiver"
diff --git a/spec/components/email/renderer_spec.rb b/spec/components/email/renderer_spec.rb
index 840c4f4bc94..3cd6df6124c 100644
--- a/spec/components/email/renderer_spec.rb
+++ b/spec/components/email/renderer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'email/renderer'
diff --git a/spec/components/email/sender_spec.rb b/spec/components/email/sender_spec.rb
index e33010fc961..0ea9d5058b4 100644
--- a/spec/components/email/sender_spec.rb
+++ b/spec/components/email/sender_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'email/sender'
diff --git a/spec/components/email/styles_spec.rb b/spec/components/email/styles_spec.rb
index d8597db6001..2d4702f51a1 100644
--- a/spec/components/email/styles_spec.rb
+++ b/spec/components/email/styles_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'email'
diff --git a/spec/components/email_cook_spec.rb b/spec/components/email_cook_spec.rb
index 4d3177efa2c..b2fdc478018 100644
--- a/spec/components/email_cook_spec.rb
+++ b/spec/components/email_cook_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'email_cook'
require 'pretty_text'
@@ -22,7 +24,7 @@ describe EmailCook do
Vestibulum feugiat mi vitae turpis tempor dignissim.
LONG_EMAIL
- long_cooked = <<~LONG_COOKED.strip!
+ long_cooked = (+<<~LONG_COOKED).strip!
Hello,
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc convallis volutpat
@@ -45,7 +47,7 @@ describe EmailCook do
Stet clita kasd gubergren.
LONG_EMAIL
- long_cooked = <<~LONG_COOKED.strip!
+ long_cooked = (+<<~LONG_COOKED).strip!
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc convallis volutpat
risus.
Nulla ac faucibus quam, quis cursus lorem. Sed rutrum eget nunc sed accumsan.
@@ -70,7 +72,7 @@ describe EmailCook do
Nunc convallis volutpat risus.
LONG_EMAIL
- long_cooked = <<~LONG_COOKED.strip!
+ long_cooked = (+<<~LONG_COOKED).strip!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<form name="f1" method="post" action="test.html" onsubmit="javascript:showAlert()">
@@ -94,7 +96,7 @@ describe EmailCook do
no indentation, but lots of spaces
LONG_EMAIL
- long_cooked = <<~LONG_COOKED.strip!
+ long_cooked = (+<<~LONG_COOKED).strip!
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
#{nbsp}#{nbsp}#{nbsp}#{nbsp}this is indended by 4 spaces
diff --git a/spec/components/email_updater_spec.rb b/spec/components/email_updater_spec.rb
index cd2270f467c..a6a9030dfb4 100644
--- a/spec/components/email_updater_spec.rb
+++ b/spec/components/email_updater_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'email_updater'
diff --git a/spec/components/enum_spec.rb b/spec/components/enum_spec.rb
index a722e4fcf47..7dd92ccd5b0 100644
--- a/spec/components/enum_spec.rb
+++ b/spec/components/enum_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'email'
diff --git a/spec/components/excerpt_parser_spec.rb b/spec/components/excerpt_parser_spec.rb
index 8410b9d5e45..f3735a907fa 100644
--- a/spec/components/excerpt_parser_spec.rb
+++ b/spec/components/excerpt_parser_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "excerpt_parser"
diff --git a/spec/components/fallback_locale_list_spec.rb b/spec/components/fallback_locale_list_spec.rb
index 2786ff1cd6f..d6cc02f05d7 100644
--- a/spec/components/fallback_locale_list_spec.rb
+++ b/spec/components/fallback_locale_list_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'i18n/backend/fallback_locale_list'
diff --git a/spec/components/feed_element_installer_spec.rb b/spec/components/feed_element_installer_spec.rb
index 48d6eb063be..92c12b40c13 100644
--- a/spec/components/feed_element_installer_spec.rb
+++ b/spec/components/feed_element_installer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'feed_element_installer'
require 'rails_helper'
diff --git a/spec/components/feed_item_accessor_spec.rb b/spec/components/feed_item_accessor_spec.rb
index 9fdd45cbb26..c19de62b90a 100644
--- a/spec/components/feed_item_accessor_spec.rb
+++ b/spec/components/feed_item_accessor_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rss'
require 'feed_item_accessor'
require 'rails_helper'
diff --git a/spec/components/file_helper_spec.rb b/spec/components/file_helper_spec.rb
index 6baa22ccff1..25dddec2d97 100644
--- a/spec/components/file_helper_spec.rb
+++ b/spec/components/file_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'file_helper'
diff --git a/spec/components/file_store/base_store_spec.rb b/spec/components/file_store/base_store_spec.rb
index df6c62c119a..cf2d1036319 100644
--- a/spec/components/file_store/base_store_spec.rb
+++ b/spec/components/file_store/base_store_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'file_store/base_store'
diff --git a/spec/components/file_store/local_store_spec.rb b/spec/components/file_store/local_store_spec.rb
index 45b91b80f9f..36768bb1b18 100644
--- a/spec/components/file_store/local_store_spec.rb
+++ b/spec/components/file_store/local_store_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'file_store/local_store'
diff --git a/spec/components/file_store/s3_store_spec.rb b/spec/components/file_store/s3_store_spec.rb
index e942c2b41ac..6bf2be7f4b5 100644
--- a/spec/components/file_store/s3_store_spec.rb
+++ b/spec/components/file_store/s3_store_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'file_store/s3_store'
require 'file_store/local_store'
diff --git a/spec/components/filter_best_posts_spec.rb b/spec/components/filter_best_posts_spec.rb
index 62fab56cbc4..717de9998bd 100644
--- a/spec/components/filter_best_posts_spec.rb
+++ b/spec/components/filter_best_posts_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'filter_best_posts'
require 'topic_view'
diff --git a/spec/components/final_destination_spec.rb b/spec/components/final_destination_spec.rb
index 0b8c41037f3..0e0c4851a85 100644
--- a/spec/components/final_destination_spec.rb
+++ b/spec/components/final_destination_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'final_destination'
diff --git a/spec/components/flag_query_spec.rb b/spec/components/flag_query_spec.rb
index 804de7adfe1..babe2f22cd4 100644
--- a/spec/components/flag_query_spec.rb
+++ b/spec/components/flag_query_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'flag_query'
diff --git a/spec/components/flag_settings_spec.rb b/spec/components/flag_settings_spec.rb
index e82d5728140..16668a8620d 100644
--- a/spec/components/flag_settings_spec.rb
+++ b/spec/components/flag_settings_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'flag_settings'
diff --git a/spec/components/freedom_patches/safe_buffer_spec.rb b/spec/components/freedom_patches/safe_buffer_spec.rb
index 0f61435015f..622d50924ad 100644
--- a/spec/components/freedom_patches/safe_buffer_spec.rb
+++ b/spec/components/freedom_patches/safe_buffer_spec.rb
@@ -1,13 +1,15 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency "freedom_patches/safe_buffer"
describe ActiveSupport::SafeBuffer do
it "can cope with encoding weirdness" do
buffer = ActiveSupport::SafeBuffer.new
- buffer << "\330".force_encoding("ASCII-8BIT")
+ buffer << (+"\330").force_encoding("ASCII-8BIT")
buffer.force_encoding "ASCII-8BIT"
buffer << "hello\330\271"
- buffer << "hello#{254.chr}".force_encoding("ASCII-8BIT").freeze
+ buffer << (+"hello#{254.chr}").force_encoding("ASCII-8BIT").freeze
# we pay a cost for force encoding, the h gets dropped
expect(buffer).to match(/ello.*hello/)
diff --git a/spec/components/freedom_patches/schema_migration_details_spec.rb b/spec/components/freedom_patches/schema_migration_details_spec.rb
index b4f378c0698..6d4a7a57fb6 100644
--- a/spec/components/freedom_patches/schema_migration_details_spec.rb
+++ b/spec/components/freedom_patches/schema_migration_details_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency "freedom_patches/schema_migration_details"
diff --git a/spec/components/freedom_patches/translate_accelerator_spec.rb b/spec/components/freedom_patches/translate_accelerator_spec.rb
index 4cef750b6dc..af2b60b5c03 100644
--- a/spec/components/freedom_patches/translate_accelerator_spec.rb
+++ b/spec/components/freedom_patches/translate_accelerator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe "translate accelerator" do
diff --git a/spec/components/gaps_spec.rb b/spec/components/gaps_spec.rb
index 6d5e357400f..234cf1a9619 100644
--- a/spec/components/gaps_spec.rb
+++ b/spec/components/gaps_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'cache'
diff --git a/spec/components/global_path_spec.rb b/spec/components/global_path_spec.rb
index daf8c49b0dc..2a940051380 100644
--- a/spec/components/global_path_spec.rb
+++ b/spec/components/global_path_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'global_path'
diff --git a/spec/components/guardian/category_guardian_spec.rb b/spec/components/guardian/category_guardian_spec.rb
index 3dccbb9e075..5f6dac0e1f4 100644
--- a/spec/components/guardian/category_guardian_spec.rb
+++ b/spec/components/guardian/category_guardian_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe CategoryGuardian do
diff --git a/spec/components/guardian/user_guardian_spec.rb b/spec/components/guardian/user_guardian_spec.rb
index 41660a12c13..03939c2f39b 100644
--- a/spec/components/guardian/user_guardian_spec.rb
+++ b/spec/components/guardian/user_guardian_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserGuardian do
diff --git a/spec/components/guardian_spec.rb b/spec/components/guardian_spec.rb
index a6b1eeec979..eaf6d74f0b4 100644
--- a/spec/components/guardian_spec.rb
+++ b/spec/components/guardian_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'guardian'
diff --git a/spec/components/has_errors_spec.rb b/spec/components/has_errors_spec.rb
index 1ae0eaef14e..19844744d1c 100644
--- a/spec/components/has_errors_spec.rb
+++ b/spec/components/has_errors_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'has_errors'
diff --git a/spec/components/highlight_js/highlight_js_spec.rb b/spec/components/highlight_js/highlight_js_spec.rb
index 7f1d8def89e..5488faa80b4 100644
--- a/spec/components/highlight_js/highlight_js_spec.rb
+++ b/spec/components/highlight_js/highlight_js_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'highlight_js/highlight_js'
diff --git a/spec/components/hijack_spec.rb b/spec/components/hijack_spec.rb
index 9969f418de3..f99d71f6933 100644
--- a/spec/components/hijack_spec.rb
+++ b/spec/components/hijack_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Hijack do
diff --git a/spec/components/html_prettify_spec.rb b/spec/components/html_prettify_spec.rb
index 189bfec8b33..c6e0c8a196d 100644
--- a/spec/components/html_prettify_spec.rb
+++ b/spec/components/html_prettify_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'html_prettify'
diff --git a/spec/components/html_to_markdown_spec.rb b/spec/components/html_to_markdown_spec.rb
index d736a2997e9..aa89ac351c7 100644
--- a/spec/components/html_to_markdown_spec.rb
+++ b/spec/components/html_to_markdown_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'html_to_markdown'
diff --git a/spec/components/image_sizer_spec.rb b/spec/components/image_sizer_spec.rb
index b0132671016..7ffe352a4c2 100644
--- a/spec/components/image_sizer_spec.rb
+++ b/spec/components/image_sizer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'image_sizer'
diff --git a/spec/components/import/normalize_spec.rb b/spec/components/import/normalize_spec.rb
index 7f8d4498c7a..a85aa5746d8 100644
--- a/spec/components/import/normalize_spec.rb
+++ b/spec/components/import/normalize_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require_dependency "import/normalize"
diff --git a/spec/components/inline_oneboxer_spec.rb b/spec/components/inline_oneboxer_spec.rb
index 44502e573b1..a7f81fd15bc 100644
--- a/spec/components/inline_oneboxer_spec.rb
+++ b/spec/components/inline_oneboxer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'inline_oneboxer'
diff --git a/spec/components/js_locale_helper_spec.rb b/spec/components/js_locale_helper_spec.rb
index 40f7c18c2a1..2a5b18365fb 100644
--- a/spec/components/js_locale_helper_spec.rb
+++ b/spec/components/js_locale_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'mini_racer'
diff --git a/spec/components/json_error_spec.rb b/spec/components/json_error_spec.rb
index 943a0c83c6f..4dfbc37211d 100644
--- a/spec/components/json_error_spec.rb
+++ b/spec/components/json_error_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'json_error'
diff --git a/spec/components/letter_avatar_spec.rb b/spec/components/letter_avatar_spec.rb
index d19aa883d88..9b2f87d3ca0 100644
--- a/spec/components/letter_avatar_spec.rb
+++ b/spec/components/letter_avatar_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'letter_avatar'
diff --git a/spec/components/method_profiler_spec.rb b/spec/components/method_profiler_spec.rb
index 480280a5fae..b11cc558087 100644
--- a/spec/components/method_profiler_spec.rb
+++ b/spec/components/method_profiler_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'method_profiler'
diff --git a/spec/components/middleware/anonymous_cache_spec.rb b/spec/components/middleware/anonymous_cache_spec.rb
index b27c01c331c..9ec7682f128 100644
--- a/spec/components/middleware/anonymous_cache_spec.rb
+++ b/spec/components/middleware/anonymous_cache_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require_dependency "middleware/anonymous_cache"
diff --git a/spec/components/middleware/request_tracker_spec.rb b/spec/components/middleware/request_tracker_spec.rb
index 69f5a0906c4..9029024953f 100644
--- a/spec/components/middleware/request_tracker_spec.rb
+++ b/spec/components/middleware/request_tracker_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require_dependency "middleware/request_tracker"
diff --git a/spec/components/migration/column_dropper_spec.rb b/spec/components/migration/column_dropper_spec.rb
index c255606f734..2a8cfd1cd77 100644
--- a/spec/components/migration/column_dropper_spec.rb
+++ b/spec/components/migration/column_dropper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'migration/column_dropper'
diff --git a/spec/components/migration/safe_migrate_spec.rb b/spec/components/migration/safe_migrate_spec.rb
index 0255006adb3..5c04f5cec51 100644
--- a/spec/components/migration/safe_migrate_spec.rb
+++ b/spec/components/migration/safe_migrate_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'migration/safe_migrate'
diff --git a/spec/components/migration/table_dropper_spec.rb b/spec/components/migration/table_dropper_spec.rb
index 9b9ac0cdf54..2f1d2216362 100644
--- a/spec/components/migration/table_dropper_spec.rb
+++ b/spec/components/migration/table_dropper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'migration/table_dropper'
diff --git a/spec/components/new_post_manager_spec.rb b/spec/components/new_post_manager_spec.rb
index dd78f1831bd..047785ee2a5 100644
--- a/spec/components/new_post_manager_spec.rb
+++ b/spec/components/new_post_manager_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'new_post_manager'
diff --git a/spec/components/new_post_result_spec.rb b/spec/components/new_post_result_spec.rb
index 3c1ad258a12..14358c623e5 100644
--- a/spec/components/new_post_result_spec.rb
+++ b/spec/components/new_post_result_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'new_post_result'
diff --git a/spec/components/onebox/engine/flash_video_onebox_spec.rb b/spec/components/onebox/engine/flash_video_onebox_spec.rb
index f8a873da393..b6aff33e852 100644
--- a/spec/components/onebox/engine/flash_video_onebox_spec.rb
+++ b/spec/components/onebox/engine/flash_video_onebox_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'onebox/engine/flash_video_onebox'
diff --git a/spec/components/onebox/engine/whitelisted_generic_onebox_spec.rb b/spec/components/onebox/engine/whitelisted_generic_onebox_spec.rb
index d9ccd91f785..c3839d104d9 100644
--- a/spec/components/onebox/engine/whitelisted_generic_onebox_spec.rb
+++ b/spec/components/onebox/engine/whitelisted_generic_onebox_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Onebox::Engine::WhitelistedGenericOnebox do
diff --git a/spec/components/oneboxer_spec.rb b/spec/components/oneboxer_spec.rb
index 7e10d2a49f0..5ed10343ce0 100644
--- a/spec/components/oneboxer_spec.rb
+++ b/spec/components/oneboxer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'oneboxer'
diff --git a/spec/components/onpdiff_spec.rb b/spec/components/onpdiff_spec.rb
index e8f3d65c137..1d0b708563b 100644
--- a/spec/components/onpdiff_spec.rb
+++ b/spec/components/onpdiff_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'onpdiff'
diff --git a/spec/components/pbkdf2_spec.rb b/spec/components/pbkdf2_spec.rb
index 233c9d62fa5..0de2f5e635c 100644
--- a/spec/components/pbkdf2_spec.rb
+++ b/spec/components/pbkdf2_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'pbkdf2'
describe Pbkdf2 do
diff --git a/spec/components/pinned_check_spec.rb b/spec/components/pinned_check_spec.rb
index b8b9dc2ba49..7e0f2918b5d 100644
--- a/spec/components/pinned_check_spec.rb
+++ b/spec/components/pinned_check_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'pinned_check'
diff --git a/spec/components/plain_text_to_markdown_spec.rb b/spec/components/plain_text_to_markdown_spec.rb
index 43437ab6cfe..afccb0f8793 100644
--- a/spec/components/plain_text_to_markdown_spec.rb
+++ b/spec/components/plain_text_to_markdown_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'plain_text_to_markdown'
diff --git a/spec/components/plugin/filter_manager_spec.rb b/spec/components/plugin/filter_manager_spec.rb
index cd87b240001..886e815358d 100644
--- a/spec/components/plugin/filter_manager_spec.rb
+++ b/spec/components/plugin/filter_manager_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'plugin/filter_manager'
diff --git a/spec/components/plugin/instance_spec.rb b/spec/components/plugin/instance_spec.rb
index 5743936241e..a13a81b01ba 100644
--- a/spec/components/plugin/instance_spec.rb
+++ b/spec/components/plugin/instance_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'plugin/instance'
diff --git a/spec/components/plugin/metadata_spec.rb b/spec/components/plugin/metadata_spec.rb
index 44b509a0b61..d982175d604 100644
--- a/spec/components/plugin/metadata_spec.rb
+++ b/spec/components/plugin/metadata_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'plugin/metadata'
diff --git a/spec/components/post_action_creator_spec.rb b/spec/components/post_action_creator_spec.rb
index e59f85d93fc..c5bf19b6ea5 100644
--- a/spec/components/post_action_creator_spec.rb
+++ b/spec/components/post_action_creator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostActionCreator do
diff --git a/spec/components/post_creator_spec.rb b/spec/components/post_creator_spec.rb
index cf2c961204b..850295d5d88 100644
--- a/spec/components/post_creator_spec.rb
+++ b/spec/components/post_creator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'post_creator'
require 'topic_subtype'
diff --git a/spec/components/post_destroyer_spec.rb b/spec/components/post_destroyer_spec.rb
index 6a8808447c6..2ab25e8e03a 100644
--- a/spec/components/post_destroyer_spec.rb
+++ b/spec/components/post_destroyer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'post_destroyer'
diff --git a/spec/components/post_locker_spec.rb b/spec/components/post_locker_spec.rb
index dd1e0291a04..471500c97a4 100644
--- a/spec/components/post_locker_spec.rb
+++ b/spec/components/post_locker_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'post_locker'
diff --git a/spec/components/post_merger_spec.rb b/spec/components/post_merger_spec.rb
index 50873dd37b8..85324f1fb7d 100644
--- a/spec/components/post_merger_spec.rb
+++ b/spec/components/post_merger_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'post_merger'
diff --git a/spec/components/post_revisor_spec.rb b/spec/components/post_revisor_spec.rb
index 1fc26a6fbdd..8f4cdb5d3c9 100644
--- a/spec/components/post_revisor_spec.rb
+++ b/spec/components/post_revisor_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'post_revisor'
diff --git a/spec/components/pretty_text_spec.rb b/spec/components/pretty_text_spec.rb
index 1c780e8a5c3..182d789d5f2 100644
--- a/spec/components/pretty_text_spec.rb
+++ b/spec/components/pretty_text_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'pretty_text'
diff --git a/spec/components/promotion_spec.rb b/spec/components/promotion_spec.rb
index 6191c2c5d89..b4b9475dfb4 100644
--- a/spec/components/promotion_spec.rb
+++ b/spec/components/promotion_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'promotion'
diff --git a/spec/components/quote_comparer_spec.rb b/spec/components/quote_comparer_spec.rb
index e0be873dd38..15dbe175b06 100644
--- a/spec/components/quote_comparer_spec.rb
+++ b/spec/components/quote_comparer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'quote_comparer'
diff --git a/spec/components/rate_limiter/limit_exceeded_spec.rb b/spec/components/rate_limiter/limit_exceeded_spec.rb
index f913add1766..f6a78ba7072 100644
--- a/spec/components/rate_limiter/limit_exceeded_spec.rb
+++ b/spec/components/rate_limiter/limit_exceeded_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe RateLimiter::LimitExceeded do
diff --git a/spec/components/rate_limiter_spec.rb b/spec/components/rate_limiter_spec.rb
index b7b4e652987..a4db789a17f 100644
--- a/spec/components/rate_limiter_spec.rb
+++ b/spec/components/rate_limiter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'rate_limiter'
diff --git a/spec/components/redis_store_spec.rb b/spec/components/redis_store_spec.rb
index c4180ed6ed2..86f37c0e192 100644
--- a/spec/components/redis_store_spec.rb
+++ b/spec/components/redis_store_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'cache'
diff --git a/spec/components/retrieve_title_spec.rb b/spec/components/retrieve_title_spec.rb
index 3a7af745fc1..a7f2c8fe455 100644
--- a/spec/components/retrieve_title_spec.rb
+++ b/spec/components/retrieve_title_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'retrieve_title'
diff --git a/spec/components/rtl_spec.rb b/spec/components/rtl_spec.rb
index 4cc776d26b8..f2622735d3a 100644
--- a/spec/components/rtl_spec.rb
+++ b/spec/components/rtl_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'rtl'
diff --git a/spec/components/s3_helper_spec.rb b/spec/components/s3_helper_spec.rb
index 2c0617290de..a903c610e75 100644
--- a/spec/components/s3_helper_spec.rb
+++ b/spec/components/s3_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "s3_helper"
require "rails_helper"
diff --git a/spec/components/s3_inventory_spec.rb b/spec/components/s3_inventory_spec.rb
index f4da2670f3f..3f4a016ec2a 100644
--- a/spec/components/s3_inventory_spec.rb
+++ b/spec/components/s3_inventory_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "s3_helper"
require "s3_inventory"
diff --git a/spec/components/scheduler/defer_spec.rb b/spec/components/scheduler/defer_spec.rb
index 8c45a0b7141..5b8333cdf5c 100644
--- a/spec/components/scheduler/defer_spec.rb
+++ b/spec/components/scheduler/defer_spec.rb
@@ -1,4 +1,6 @@
# encoding: utf-8
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'scheduler/defer'
diff --git a/spec/components/score_calculator_spec.rb b/spec/components/score_calculator_spec.rb
index e7231afd139..c74ab065945 100644
--- a/spec/components/score_calculator_spec.rb
+++ b/spec/components/score_calculator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'score_calculator'
diff --git a/spec/components/search_spec.rb b/spec/components/search_spec.rb
index 02264c58182..7b23bb84178 100644
--- a/spec/components/search_spec.rb
+++ b/spec/components/search_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require_dependency 'search'
@@ -1152,14 +1153,14 @@ describe Search do
context '#ts_query' do
it 'can parse complex strings using ts_query helper' do
- str = " grigio:babel deprecated? "
+ str = +" grigio:babel deprecated? "
str << "page page on Atmosphere](https://atmospherejs.com/grigio/babel)xxx: aaa.js:222 aaa'\"bbb"
ts_query = Search.ts_query(term: str, ts_config: "simple")
- expect { DB.exec("SELECT to_tsvector('bbb') @@ " << ts_query) }.to_not raise_error
+ expect { DB.exec(+"SELECT to_tsvector('bbb') @@ " << ts_query) }.to_not raise_error
ts_query = Search.ts_query(term: "foo.bar/'&baz", ts_config: "simple")
- expect { DB.exec("SELECT to_tsvector('bbb') @@ " << ts_query) }.to_not raise_error
+ expect { DB.exec(+"SELECT to_tsvector('bbb') @@ " << ts_query) }.to_not raise_error
expect(ts_query).to include("baz")
end
end
diff --git a/spec/components/secure_session_spec.rb b/spec/components/secure_session_spec.rb
index df5f5532532..cb0a885c309 100644
--- a/spec/components/secure_session_spec.rb
+++ b/spec/components/secure_session_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'secure_session'
diff --git a/spec/components/site_settings/db_provider_spec.rb b/spec/components/site_settings/db_provider_spec.rb
index 9ed47a79dcc..7caa07862bc 100644
--- a/spec/components/site_settings/db_provider_spec.rb
+++ b/spec/components/site_settings/db_provider_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'site_settings/db_provider'
diff --git a/spec/components/site_settings/defaults_provider_spec.rb b/spec/components/site_settings/defaults_provider_spec.rb
index 463c19742b4..bbcf524f528 100644
--- a/spec/components/site_settings/defaults_provider_spec.rb
+++ b/spec/components/site_settings/defaults_provider_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'site_settings/defaults_provider'
diff --git a/spec/components/site_settings/local_process_provider_spec.rb b/spec/components/site_settings/local_process_provider_spec.rb
index 65ab40114e2..40a4b539947 100644
--- a/spec/components/site_settings/local_process_provider_spec.rb
+++ b/spec/components/site_settings/local_process_provider_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'site_settings/local_process_provider'
diff --git a/spec/components/site_settings/type_supervisor_spec.rb b/spec/components/site_settings/type_supervisor_spec.rb
index 2fae2ff5818..b6d01e0f3e0 100644
--- a/spec/components/site_settings/type_supervisor_spec.rb
+++ b/spec/components/site_settings/type_supervisor_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'site_settings/type_supervisor'
diff --git a/spec/components/site_settings/yaml_loader_spec.rb b/spec/components/site_settings/yaml_loader_spec.rb
index 2a56f92686a..e39e8c6a097 100644
--- a/spec/components/site_settings/yaml_loader_spec.rb
+++ b/spec/components/site_settings/yaml_loader_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'site_settings/yaml_loader'
diff --git a/spec/components/slug_spec.rb b/spec/components/slug_spec.rb
index 99ba5a2dd8c..d475e578c26 100644
--- a/spec/components/slug_spec.rb
+++ b/spec/components/slug_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require 'slug'
diff --git a/spec/components/spam_handler_spec.rb b/spec/components/spam_handler_spec.rb
index 380784f6ae8..f4216854d2f 100644
--- a/spec/components/spam_handler_spec.rb
+++ b/spec/components/spam_handler_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "spam_handler"
diff --git a/spec/components/stylesheet/compiler_spec.rb b/spec/components/stylesheet/compiler_spec.rb
index 0c9bf8bc127..a5f2a95f0d5 100644
--- a/spec/components/stylesheet/compiler_spec.rb
+++ b/spec/components/stylesheet/compiler_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'stylesheet/compiler'
diff --git a/spec/components/stylesheet/importer_spec.rb b/spec/components/stylesheet/importer_spec.rb
index 01abdc8c3d3..7c9d1353e95 100644
--- a/spec/components/stylesheet/importer_spec.rb
+++ b/spec/components/stylesheet/importer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'stylesheet/importer'
diff --git a/spec/components/stylesheet/manager_spec.rb b/spec/components/stylesheet/manager_spec.rb
index bf5d17134d5..e7350712580 100644
--- a/spec/components/stylesheet/manager_spec.rb
+++ b/spec/components/stylesheet/manager_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'stylesheet/compiler'
diff --git a/spec/components/suggested_topics_builder_spec.rb b/spec/components/suggested_topics_builder_spec.rb
index 7c883f757a6..69264c2a5c5 100644
--- a/spec/components/suggested_topics_builder_spec.rb
+++ b/spec/components/suggested_topics_builder_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'suggested_topics_builder'
diff --git a/spec/components/svg_sprite/svg_sprite_spec.rb b/spec/components/svg_sprite/svg_sprite_spec.rb
index 762e5c4fc28..f511e613d13 100644
--- a/spec/components/svg_sprite/svg_sprite_spec.rb
+++ b/spec/components/svg_sprite/svg_sprite_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SvgSprite do
diff --git a/spec/components/system_message_spec.rb b/spec/components/system_message_spec.rb
index 35dd84d74c2..29c25c4f59e 100644
--- a/spec/components/system_message_spec.rb
+++ b/spec/components/system_message_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'system_message'
require 'topic_subtype'
diff --git a/spec/components/text_cleaner_spec.rb b/spec/components/text_cleaner_spec.rb
index e98ca726b50..4d01c35038c 100644
--- a/spec/components/text_cleaner_spec.rb
+++ b/spec/components/text_cleaner_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'text_cleaner'
diff --git a/spec/components/text_sentinel_spec.rb b/spec/components/text_sentinel_spec.rb
index c9db707b945..d14a8bf6248 100644
--- a/spec/components/text_sentinel_spec.rb
+++ b/spec/components/text_sentinel_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require 'text_sentinel'
diff --git a/spec/components/theme_settings_manager_spec.rb b/spec/components/theme_settings_manager_spec.rb
index 525d98d5078..8dba26c3307 100644
--- a/spec/components/theme_settings_manager_spec.rb
+++ b/spec/components/theme_settings_manager_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'theme_settings_manager'
diff --git a/spec/components/theme_settings_parser_spec.rb b/spec/components/theme_settings_parser_spec.rb
index 4f8e9c9a42e..e65169bd950 100644
--- a/spec/components/theme_settings_parser_spec.rb
+++ b/spec/components/theme_settings_parser_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'theme_settings_parser'
diff --git a/spec/components/theme_store/git_importer_spec.rb b/spec/components/theme_store/git_importer_spec.rb
index 177e6bf34df..0df9836f908 100644
--- a/spec/components/theme_store/git_importer_spec.rb
+++ b/spec/components/theme_store/git_importer_spec.rb
@@ -1,5 +1,6 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require 'theme_store/git_importer'
diff --git a/spec/components/theme_store/tgz_exporter_spec.rb b/spec/components/theme_store/tgz_exporter_spec.rb
index 0fe24482e5c..eb2ff1afa53 100644
--- a/spec/components/theme_store/tgz_exporter_spec.rb
+++ b/spec/components/theme_store/tgz_exporter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'theme_store/tgz_exporter'
diff --git a/spec/components/theme_store/tgz_importer_spec.rb b/spec/components/theme_store/tgz_importer_spec.rb
index 5464d8464dc..2986b1d2c9c 100644
--- a/spec/components/theme_store/tgz_importer_spec.rb
+++ b/spec/components/theme_store/tgz_importer_spec.rb
@@ -1,5 +1,6 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require 'theme_store/tgz_importer'
diff --git a/spec/components/timeline_lookup_spec.rb b/spec/components/timeline_lookup_spec.rb
index c7d69344a79..f47fb93e6f0 100644
--- a/spec/components/timeline_lookup_spec.rb
+++ b/spec/components/timeline_lookup_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'timeline_lookup'
diff --git a/spec/components/topic_creator_spec.rb b/spec/components/topic_creator_spec.rb
index 4ea17bf22a5..b3d62d7a485 100644
--- a/spec/components/topic_creator_spec.rb
+++ b/spec/components/topic_creator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicCreator do
diff --git a/spec/components/topic_publisher_spec.rb b/spec/components/topic_publisher_spec.rb
index 897ef297ef8..00a4f7b120b 100644
--- a/spec/components/topic_publisher_spec.rb
+++ b/spec/components/topic_publisher_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'topic_publisher'
require 'rails_helper'
diff --git a/spec/components/topic_query_spec.rb b/spec/components/topic_query_spec.rb
index 97c8afd63e5..6ebbbe22615 100644
--- a/spec/components/topic_query_spec.rb
+++ b/spec/components/topic_query_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'topic_view'
diff --git a/spec/components/topic_retriever_spec.rb b/spec/components/topic_retriever_spec.rb
index 53624481951..4c2d97d31dd 100644
--- a/spec/components/topic_retriever_spec.rb
+++ b/spec/components/topic_retriever_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'topic_retriever'
diff --git a/spec/components/topic_view_spec.rb b/spec/components/topic_view_spec.rb
index b4e71e42503..1d8635a8489 100644
--- a/spec/components/topic_view_spec.rb
+++ b/spec/components/topic_view_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'topic_view'
diff --git a/spec/components/topics_bulk_action_spec.rb b/spec/components/topics_bulk_action_spec.rb
index a30ba34fa21..b73ef4d2a68 100644
--- a/spec/components/topics_bulk_action_spec.rb
+++ b/spec/components/topics_bulk_action_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'topics_bulk_action'
diff --git a/spec/components/trashable_spec.rb b/spec/components/trashable_spec.rb
index 89d8b5ba7aa..16a3cafb490 100644
--- a/spec/components/trashable_spec.rb
+++ b/spec/components/trashable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'trashable'
diff --git a/spec/components/trust_level_spec.rb b/spec/components/trust_level_spec.rb
index 87f0b08cd9b..75c0df7f44b 100644
--- a/spec/components/trust_level_spec.rb
+++ b/spec/components/trust_level_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TrustLevel do
diff --git a/spec/components/unread_spec.rb b/spec/components/unread_spec.rb
index c7789d94eb1..d820fb9fc76 100644
--- a/spec/components/unread_spec.rb
+++ b/spec/components/unread_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'unread'
diff --git a/spec/components/url_helper_spec.rb b/spec/components/url_helper_spec.rb
index ba7bc71e0c7..5da5c8323fc 100644
--- a/spec/components/url_helper_spec.rb
+++ b/spec/components/url_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'url_helper'
diff --git a/spec/components/user_name_suggester_spec.rb b/spec/components/user_name_suggester_spec.rb
index 37f4a37a931..7965458b3df 100644
--- a/spec/components/user_name_suggester_spec.rb
+++ b/spec/components/user_name_suggester_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'user_name_suggester'
diff --git a/spec/components/validators/allowed_ip_address_validator_spec.rb b/spec/components/validators/allowed_ip_address_validator_spec.rb
index aa5c074fd49..93baf52bc1a 100644
--- a/spec/components/validators/allowed_ip_address_validator_spec.rb
+++ b/spec/components/validators/allowed_ip_address_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe AllowedIpAddressValidator do
diff --git a/spec/components/validators/category_searrch_priority_weights_validator_spec.rb b/spec/components/validators/category_searrch_priority_weights_validator_spec.rb
index 91000756778..d0023703858 100644
--- a/spec/components/validators/category_searrch_priority_weights_validator_spec.rb
+++ b/spec/components/validators/category_searrch_priority_weights_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'validators/category_search_priority_weights_validator'
diff --git a/spec/components/validators/email_setting_validator_spec.rb b/spec/components/validators/email_setting_validator_spec.rb
index a143b381171..d5323112a23 100644
--- a/spec/components/validators/email_setting_validator_spec.rb
+++ b/spec/components/validators/email_setting_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe EmailSettingValidator do
diff --git a/spec/components/validators/email_validator_spec.rb b/spec/components/validators/email_validator_spec.rb
index 9e52e83f6b8..0c4616817a5 100644
--- a/spec/components/validators/email_validator_spec.rb
+++ b/spec/components/validators/email_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe EmailValidator do
diff --git a/spec/components/validators/enable_invite_only_validator_spec.rb b/spec/components/validators/enable_invite_only_validator_spec.rb
index 39a8e017861..fe3af0dccb6 100644
--- a/spec/components/validators/enable_invite_only_validator_spec.rb
+++ b/spec/components/validators/enable_invite_only_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe EnableInviteOnlyValidator do
diff --git a/spec/components/validators/enable_local_logins_via_email_validator_spec.rb b/spec/components/validators/enable_local_logins_via_email_validator_spec.rb
index 289ce4911d0..2a91aea2812 100644
--- a/spec/components/validators/enable_local_logins_via_email_validator_spec.rb
+++ b/spec/components/validators/enable_local_logins_via_email_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe EnableLocalLoginsViaEmailValidator do
diff --git a/spec/components/validators/enable_sso_validator_spec.rb b/spec/components/validators/enable_sso_validator_spec.rb
index c78bbb976cf..9114792d27f 100644
--- a/spec/components/validators/enable_sso_validator_spec.rb
+++ b/spec/components/validators/enable_sso_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe EnableSsoValidator do
diff --git a/spec/components/validators/external_system_avatars_validator_spec.rb b/spec/components/validators/external_system_avatars_validator_spec.rb
index 1057f20b3f3..6a0d255268f 100644
--- a/spec/components/validators/external_system_avatars_validator_spec.rb
+++ b/spec/components/validators/external_system_avatars_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ExternalSystemAvatarsValidator do
diff --git a/spec/components/validators/group_setting_validator_spec.rb b/spec/components/validators/group_setting_validator_spec.rb
index 668d44badd1..09e14d95143 100644
--- a/spec/components/validators/group_setting_validator_spec.rb
+++ b/spec/components/validators/group_setting_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe GroupSettingValidator do
diff --git a/spec/components/validators/integer_setting_validator_spec.rb b/spec/components/validators/integer_setting_validator_spec.rb
index 3f7b0f2a72e..4936325f0c8 100644
--- a/spec/components/validators/integer_setting_validator_spec.rb
+++ b/spec/components/validators/integer_setting_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe IntegerSettingValidator do
diff --git a/spec/components/validators/ip_address_format_validator_spec.rb b/spec/components/validators/ip_address_format_validator_spec.rb
index 77d08009862..9f8a77d4962 100644
--- a/spec/components/validators/ip_address_format_validator_spec.rb
+++ b/spec/components/validators/ip_address_format_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe IpAddressFormatValidator do
diff --git a/spec/components/validators/max_emojis_validator_spec.rb b/spec/components/validators/max_emojis_validator_spec.rb
index 1242a32a4e8..f15a951db8a 100644
--- a/spec/components/validators/max_emojis_validator_spec.rb
+++ b/spec/components/validators/max_emojis_validator_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
require 'validators/max_emojis_validator'
diff --git a/spec/components/validators/max_username_length_validator_spec.rb b/spec/components/validators/max_username_length_validator_spec.rb
index dd7751fee62..6cf0b1a3a17 100644
--- a/spec/components/validators/max_username_length_validator_spec.rb
+++ b/spec/components/validators/max_username_length_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe MaxUsernameLengthValidator do
diff --git a/spec/components/validators/min_username_length_validator_spec.rb b/spec/components/validators/min_username_length_validator_spec.rb
index 6a2a4e131af..a77d41e0b73 100644
--- a/spec/components/validators/min_username_length_validator_spec.rb
+++ b/spec/components/validators/min_username_length_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe MinUsernameLengthValidator do
diff --git a/spec/components/validators/password_validator_spec.rb b/spec/components/validators/password_validator_spec.rb
index 1e6cc4cde05..571a6e17fb8 100644
--- a/spec/components/validators/password_validator_spec.rb
+++ b/spec/components/validators/password_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency "common_passwords/common_passwords"
diff --git a/spec/components/validators/post_validator_spec.rb b/spec/components/validators/post_validator_spec.rb
index b09a1bba885..deb51c3ad6f 100644
--- a/spec/components/validators/post_validator_spec.rb
+++ b/spec/components/validators/post_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'validators/post_validator'
diff --git a/spec/components/validators/quality_title_validator_spec.rb b/spec/components/validators/quality_title_validator_spec.rb
index 10e53a10669..121a18e98c1 100644
--- a/spec/components/validators/quality_title_validator_spec.rb
+++ b/spec/components/validators/quality_title_validator_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
require 'validators/quality_title_validator'
diff --git a/spec/components/validators/regex_presence_validator_spec.rb b/spec/components/validators/regex_presence_validator_spec.rb
index 819269e155f..6d2cdc6977f 100644
--- a/spec/components/validators/regex_presence_validator_spec.rb
+++ b/spec/components/validators/regex_presence_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
RSpec.describe RegexPresenceValidator do
diff --git a/spec/components/validators/regex_setting_validator_spec.rb b/spec/components/validators/regex_setting_validator_spec.rb
index b7bb82f24e1..1fb1a733db9 100644
--- a/spec/components/validators/regex_setting_validator_spec.rb
+++ b/spec/components/validators/regex_setting_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe RegexSettingValidator do
diff --git a/spec/components/validators/reply_by_email_address_validator_spec.rb b/spec/components/validators/reply_by_email_address_validator_spec.rb
index 79eb7d443ba..f73b11af9e4 100644
--- a/spec/components/validators/reply_by_email_address_validator_spec.rb
+++ b/spec/components/validators/reply_by_email_address_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ReplyByEmailAddressValidator do
diff --git a/spec/components/validators/reply_by_email_enabled_validator_spec.rb b/spec/components/validators/reply_by_email_enabled_validator_spec.rb
index e7cd318ed5a..99576bcdb5d 100644
--- a/spec/components/validators/reply_by_email_enabled_validator_spec.rb
+++ b/spec/components/validators/reply_by_email_enabled_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ReplyByEmailEnabledValidator do
diff --git a/spec/components/validators/sso_overrides_email_validator_spec.rb b/spec/components/validators/sso_overrides_email_validator_spec.rb
index 6af0695dfe2..fd38caf3f47 100644
--- a/spec/components/validators/sso_overrides_email_validator_spec.rb
+++ b/spec/components/validators/sso_overrides_email_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe SsoOverridesEmailValidator do
diff --git a/spec/components/validators/string_setting_validator_spec.rb b/spec/components/validators/string_setting_validator_spec.rb
index 890c2dc939d..5e56a406e91 100644
--- a/spec/components/validators/string_setting_validator_spec.rb
+++ b/spec/components/validators/string_setting_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe StringSettingValidator do
diff --git a/spec/components/validators/topic_title_length_validator_spec.rb b/spec/components/validators/topic_title_length_validator_spec.rb
index dc39cca0eb3..e8fcf50a683 100644
--- a/spec/components/validators/topic_title_length_validator_spec.rb
+++ b/spec/components/validators/topic_title_length_validator_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
require 'validators/topic_title_length_validator'
diff --git a/spec/components/validators/unicode_username_validator_spec.rb b/spec/components/validators/unicode_username_validator_spec.rb
index d8d8f59cb13..f53508f0f96 100644
--- a/spec/components/validators/unicode_username_validator_spec.rb
+++ b/spec/components/validators/unicode_username_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UnicodeUsernameValidator do
diff --git a/spec/components/validators/unicode_username_whitelist_validator_spec.rb b/spec/components/validators/unicode_username_whitelist_validator_spec.rb
index 8176e120483..0deb2da8e9c 100644
--- a/spec/components/validators/unicode_username_whitelist_validator_spec.rb
+++ b/spec/components/validators/unicode_username_whitelist_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UnicodeUsernameWhitelistValidator do
diff --git a/spec/components/validators/upload_validator_spec.rb b/spec/components/validators/upload_validator_spec.rb
index 8e9a952ee51..cd4c339b279 100644
--- a/spec/components/validators/upload_validator_spec.rb
+++ b/spec/components/validators/upload_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'validators/upload_validator'
diff --git a/spec/components/validators/url_validator_spec.rb b/spec/components/validators/url_validator_spec.rb
index 4278fc2ecbc..ede0ad71ab7 100644
--- a/spec/components/validators/url_validator_spec.rb
+++ b/spec/components/validators/url_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'validators/topic_title_length_validator'
diff --git a/spec/components/validators/user_full_name_validator_spec.rb b/spec/components/validators/user_full_name_validator_spec.rb
index b6b6829347b..1b63986bca1 100644
--- a/spec/components/validators/user_full_name_validator_spec.rb
+++ b/spec/components/validators/user_full_name_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe UserFullNameValidator do
diff --git a/spec/components/validators/username_setting_validator_spec.rb b/spec/components/validators/username_setting_validator_spec.rb
index 8b302bba350..36e541ca9e6 100644
--- a/spec/components/validators/username_setting_validator_spec.rb
+++ b/spec/components/validators/username_setting_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UsernameSettingValidator do
diff --git a/spec/components/version_spec.rb b/spec/components/version_spec.rb
index 6844205d711..5017983c163 100644
--- a/spec/components/version_spec.rb
+++ b/spec/components/version_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'version'
diff --git a/spec/components/wizard/step_updater_spec.rb b/spec/components/wizard/step_updater_spec.rb
index f38190a6037..12ab0dcd8be 100644
--- a/spec/components/wizard/step_updater_spec.rb
+++ b/spec/components/wizard/step_updater_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'wizard'
require_dependency 'wizard/builder'
diff --git a/spec/components/wizard/wizard_builder_spec.rb b/spec/components/wizard/wizard_builder_spec.rb
index b0846fb782c..9281247abbf 100644
--- a/spec/components/wizard/wizard_builder_spec.rb
+++ b/spec/components/wizard/wizard_builder_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'wizard'
require 'wizard/builder'
diff --git a/spec/components/wizard/wizard_spec.rb b/spec/components/wizard/wizard_spec.rb
index 46c68a38b49..f0b543e9bef 100644
--- a/spec/components/wizard/wizard_spec.rb
+++ b/spec/components/wizard/wizard_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'wizard'
diff --git a/spec/components/wizard/wizard_step_spec.rb b/spec/components/wizard/wizard_step_spec.rb
index 7df0dc809fc..bccec054a0d 100644
--- a/spec/components/wizard/wizard_step_spec.rb
+++ b/spec/components/wizard/wizard_step_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'wizard'
diff --git a/spec/fabricators/api_key_fabricator.rb b/spec/fabricators/api_key_fabricator.rb
index a83ba6aebf3..f2f766baee4 100644
--- a/spec/fabricators/api_key_fabricator.rb
+++ b/spec/fabricators/api_key_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:api_key) do
key '1dfb7d427400cb8ef18052fd412781af134cceca5725dd74f34bbc6b9e35ddc9'
end
diff --git a/spec/fabricators/badge_fabricator.rb b/spec/fabricators/badge_fabricator.rb
index e535919d3a1..b99fe209e7a 100644
--- a/spec/fabricators/badge_fabricator.rb
+++ b/spec/fabricators/badge_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:badge_type) do
name { sequence(:name) { |i| "Silver #{i}" } }
end
diff --git a/spec/fabricators/category_fabricator.rb b/spec/fabricators/category_fabricator.rb
index 67e498ab163..450f7987ee2 100644
--- a/spec/fabricators/category_fabricator.rb
+++ b/spec/fabricators/category_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:category) do
name { sequence(:name) { |n| "Amazing Category #{n}" } }
user
diff --git a/spec/fabricators/category_group_fabricator.rb b/spec/fabricators/category_group_fabricator.rb
index 898825b80ea..fbddb169700 100644
--- a/spec/fabricators/category_group_fabricator.rb
+++ b/spec/fabricators/category_group_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:category_group) do
category
group
diff --git a/spec/fabricators/color_scheme_color_fabricator.rb b/spec/fabricators/color_scheme_color_fabricator.rb
index ae8ec724259..c5dfd3997ec 100644
--- a/spec/fabricators/color_scheme_color_fabricator.rb
+++ b/spec/fabricators/color_scheme_color_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:color_scheme_color) do
color_scheme
name { sequence(:name) { |i| "color_#{i}" } }
diff --git a/spec/fabricators/color_scheme_fabricator.rb b/spec/fabricators/color_scheme_fabricator.rb
index 67ee8becda3..711b0f5e949 100644
--- a/spec/fabricators/color_scheme_fabricator.rb
+++ b/spec/fabricators/color_scheme_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:color_scheme) do
name { sequence(:name) { |i| "Palette #{i}" } }
color_scheme_colors(count: 2) { |attrs, i| Fabricate.build(:color_scheme_color, color_scheme: nil) }
diff --git a/spec/fabricators/email_change_request_fabricator.rb b/spec/fabricators/email_change_request_fabricator.rb
index ba5a96f6bee..8e2471c032c 100644
--- a/spec/fabricators/email_change_request_fabricator.rb
+++ b/spec/fabricators/email_change_request_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:email_change_request) do
user
old_email { sequence(:old_email) { |i| "bruce#{i}@wayne.com" } }
diff --git a/spec/fabricators/email_log_fabricator.rb b/spec/fabricators/email_log_fabricator.rb
index 1b46c6c6cec..43aeb20788b 100644
--- a/spec/fabricators/email_log_fabricator.rb
+++ b/spec/fabricators/email_log_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:email_log) do
user
to_address { sequence(:address) { |i| "blah#{i}@example.com" } }
diff --git a/spec/fabricators/email_token_fabricator.rb b/spec/fabricators/email_token_fabricator.rb
index 95738b8cfb4..a1ae1cbd9d5 100644
--- a/spec/fabricators/email_token_fabricator.rb
+++ b/spec/fabricators/email_token_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:email_token) do
user
email { |attrs| attrs[:user].email }
diff --git a/spec/fabricators/embeddable_host_fabricator.rb b/spec/fabricators/embeddable_host_fabricator.rb
index 0c668579c9e..021be2d20c5 100644
--- a/spec/fabricators/embeddable_host_fabricator.rb
+++ b/spec/fabricators/embeddable_host_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:embeddable_host) do
host "eviltrout.com"
category
diff --git a/spec/fabricators/flag_fabricator.rb b/spec/fabricators/flag_fabricator.rb
index e2994f8d062..d4b30c52377 100644
--- a/spec/fabricators/flag_fabricator.rb
+++ b/spec/fabricators/flag_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:flag, from: :post_action) do
user
post
diff --git a/spec/fabricators/group_fabricator.rb b/spec/fabricators/group_fabricator.rb
index a4c80237c85..8b66bdacda9 100644
--- a/spec/fabricators/group_fabricator.rb
+++ b/spec/fabricators/group_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:group) do
name { sequence(:name) { |n| "my_group_#{n}" } }
end
diff --git a/spec/fabricators/group_history_fabricator.rb b/spec/fabricators/group_history_fabricator.rb
index 9b5b44c056b..179ffdaf374 100644
--- a/spec/fabricators/group_history_fabricator.rb
+++ b/spec/fabricators/group_history_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:group_history) do
group
action GroupHistory.actions[:add_user_to_group]
diff --git a/spec/fabricators/group_request_fabricator.rb b/spec/fabricators/group_request_fabricator.rb
index caa2fc70fbd..6f18d7c2cf8 100644
--- a/spec/fabricators/group_request_fabricator.rb
+++ b/spec/fabricators/group_request_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:group_request) do
user
group
diff --git a/spec/fabricators/group_user_fabricator.rb b/spec/fabricators/group_user_fabricator.rb
index 9ed23e47eb3..48b70cb8ae3 100644
--- a/spec/fabricators/group_user_fabricator.rb
+++ b/spec/fabricators/group_user_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:group_user) do
user
group
diff --git a/spec/fabricators/ignored_user.rb b/spec/fabricators/ignored_user.rb
index 73175c8cd34..39447499d77 100644
--- a/spec/fabricators/ignored_user.rb
+++ b/spec/fabricators/ignored_user.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:ignored_user) do
user
end
diff --git a/spec/fabricators/incoming_email_fabricator.rb b/spec/fabricators/incoming_email_fabricator.rb
index d91f6a9e399..33d31ac4baf 100644
--- a/spec/fabricators/incoming_email_fabricator.rb
+++ b/spec/fabricators/incoming_email_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:incoming_email) do
message_id "12345@example.com"
subject "Hello world"
diff --git a/spec/fabricators/incoming_link_fabricator.rb b/spec/fabricators/incoming_link_fabricator.rb
index 704099a4fb3..84cb919566d 100644
--- a/spec/fabricators/incoming_link_fabricator.rb
+++ b/spec/fabricators/incoming_link_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:incoming_link) do
user
post
diff --git a/spec/fabricators/invite_fabricator.rb b/spec/fabricators/invite_fabricator.rb
index d092cf73703..7b390ae90c4 100644
--- a/spec/fabricators/invite_fabricator.rb
+++ b/spec/fabricators/invite_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:invite) do
invited_by(fabricator: :user)
email 'iceking@ADVENTURETIME.ooo'
diff --git a/spec/fabricators/like_fabricator.rb b/spec/fabricators/like_fabricator.rb
index 43591bd5c10..bc9475c44fc 100644
--- a/spec/fabricators/like_fabricator.rb
+++ b/spec/fabricators/like_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:like, from: :post_action) do
post
user
diff --git a/spec/fabricators/muted_user.rb b/spec/fabricators/muted_user.rb
index 9c486d63d4d..4bee8414e01 100644
--- a/spec/fabricators/muted_user.rb
+++ b/spec/fabricators/muted_user.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:muted_user) do
user
end
diff --git a/spec/fabricators/notification_fabricator.rb b/spec/fabricators/notification_fabricator.rb
index 804558325ea..da533b9c7a2 100644
--- a/spec/fabricators/notification_fabricator.rb
+++ b/spec/fabricators/notification_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:notification) do
transient :post
notification_type Notification.types[:mentioned]
diff --git a/spec/fabricators/optimized_image_fabricator.rb b/spec/fabricators/optimized_image_fabricator.rb
index 2ac3b8a96a6..f5311b9cfc6 100644
--- a/spec/fabricators/optimized_image_fabricator.rb
+++ b/spec/fabricators/optimized_image_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:optimized_image) do
upload
sha1 "86f7e437faa5a7fce15d1ddcb9eaeaea377667b8"
diff --git a/spec/fabricators/permalink_fabricator.rb b/spec/fabricators/permalink_fabricator.rb
index 51a38ac9023..b2852126064 100644
--- a/spec/fabricators/permalink_fabricator.rb
+++ b/spec/fabricators/permalink_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:permalink) do
url { sequence(:url) { |i| "my/#{i}/url" } }
end
diff --git a/spec/fabricators/post_custom_field_fabricator.rb b/spec/fabricators/post_custom_field_fabricator.rb
index 1c764dc871e..035dce262cb 100644
--- a/spec/fabricators/post_custom_field_fabricator.rb
+++ b/spec/fabricators/post_custom_field_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:post_custom_field) do
post
name { sequence(:key) { |i| "key#{i}" } }
diff --git a/spec/fabricators/post_detail_fabricator.rb b/spec/fabricators/post_detail_fabricator.rb
index 8fdcec29106..0bcf2bfb484 100644
--- a/spec/fabricators/post_detail_fabricator.rb
+++ b/spec/fabricators/post_detail_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:post_detail) do
post
key { sequence(:key) { |i| "key#{i}" } }
diff --git a/spec/fabricators/post_fabricator.rb b/spec/fabricators/post_fabricator.rb
index 41de111122a..219a165528f 100644
--- a/spec/fabricators/post_fabricator.rb
+++ b/spec/fabricators/post_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:post) do
user
topic { |attrs| Fabricate(:topic, user: attrs[:user]) }
diff --git a/spec/fabricators/post_reply_key_fabricator.rb b/spec/fabricators/post_reply_key_fabricator.rb
index 99fef8275ac..27a1185cd63 100644
--- a/spec/fabricators/post_reply_key_fabricator.rb
+++ b/spec/fabricators/post_reply_key_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:post_reply_key) do
user
post
diff --git a/spec/fabricators/post_revision_fabricator.rb b/spec/fabricators/post_revision_fabricator.rb
index 43cc8f67bd0..059f1af5a93 100644
--- a/spec/fabricators/post_revision_fabricator.rb
+++ b/spec/fabricators/post_revision_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:post_revision) do
post
user
diff --git a/spec/fabricators/reviewable_fabricator.rb b/spec/fabricators/reviewable_fabricator.rb
index a1619961566..cbe77ebf2b9 100644
--- a/spec/fabricators/reviewable_fabricator.rb
+++ b/spec/fabricators/reviewable_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:reviewable) do
reviewable_by_moderator true
type 'ReviewableUser'
diff --git a/spec/fabricators/screened_email_fabricator.rb b/spec/fabricators/screened_email_fabricator.rb
index 5373e3370a3..42f18fe7865 100644
--- a/spec/fabricators/screened_email_fabricator.rb
+++ b/spec/fabricators/screened_email_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:screened_email) do
email { sequence(:email) { |n| "bad#{n}@spammers.org" } }
action_type ScreenedEmail.actions[:block]
diff --git a/spec/fabricators/screened_ip_address_fabricator.rb b/spec/fabricators/screened_ip_address_fabricator.rb
index 4a4cc363430..957f20ad77d 100644
--- a/spec/fabricators/screened_ip_address_fabricator.rb
+++ b/spec/fabricators/screened_ip_address_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:screened_ip_address) do
ip_address { sequence(:ip_address) { |n| "123.#{(n * 3) % 255}.#{(n * 2) % 255}.#{n % 255}" } }
end
diff --git a/spec/fabricators/screened_url_fabricator.rb b/spec/fabricators/screened_url_fabricator.rb
index 09b6eae4124..8533946c65a 100644
--- a/spec/fabricators/screened_url_fabricator.rb
+++ b/spec/fabricators/screened_url_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:screened_url) do
url { sequence(:url) { |n| "spammers#{n}.org/buy/stuff" } }
domain { sequence(:domain) { |n| "spammers#{n}.org" } }
diff --git a/spec/fabricators/search_log_fabricator.rb b/spec/fabricators/search_log_fabricator.rb
index 19d934ce589..d9d8aa701f1 100644
--- a/spec/fabricators/search_log_fabricator.rb
+++ b/spec/fabricators/search_log_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:search_log) do
term "ruby"
search_type SearchLog.search_types[:header]
diff --git a/spec/fabricators/shared_draft_fabricator.rb b/spec/fabricators/shared_draft_fabricator.rb
index 4a286374e4a..081ff27b9ee 100644
--- a/spec/fabricators/shared_draft_fabricator.rb
+++ b/spec/fabricators/shared_draft_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:shared_draft) do
topic
category
diff --git a/spec/fabricators/single_sign_on_record_fabricator.rb b/spec/fabricators/single_sign_on_record_fabricator.rb
index ef2cb0b7640..95c6a6028f4 100644
--- a/spec/fabricators/single_sign_on_record_fabricator.rb
+++ b/spec/fabricators/single_sign_on_record_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:single_sign_on_record) do
user
external_id { sequence(:external_id) { |i| "ext_#{i}" } }
diff --git a/spec/fabricators/skipped_email_log_fabricator.rb b/spec/fabricators/skipped_email_log_fabricator.rb
index ec4692a6d75..13bb79e55d3 100644
--- a/spec/fabricators/skipped_email_log_fabricator.rb
+++ b/spec/fabricators/skipped_email_log_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:skipped_email_log) do
to_address { sequence(:address) { |i| "blah#{i}@example.com" } }
email_type :invite
diff --git a/spec/fabricators/tag_fabricator.rb b/spec/fabricators/tag_fabricator.rb
index 4c4d3d3eb47..c2192294efb 100644
--- a/spec/fabricators/tag_fabricator.rb
+++ b/spec/fabricators/tag_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:tag) do
name { sequence(:name) { |i| "tag#{i + 1}" } }
end
diff --git a/spec/fabricators/tag_group_fabricator.rb b/spec/fabricators/tag_group_fabricator.rb
index f410aa5bd75..990ec85d72a 100644
--- a/spec/fabricators/tag_group_fabricator.rb
+++ b/spec/fabricators/tag_group_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:tag_group) do
name { sequence(:name) { |i| "tag_group_#{i}" } }
end
diff --git a/spec/fabricators/theme_fabricator.rb b/spec/fabricators/theme_fabricator.rb
index 39712756c39..e1d4d5af91a 100644
--- a/spec/fabricators/theme_fabricator.rb
+++ b/spec/fabricators/theme_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:theme) do
name { sequence(:name) { |i| "Cool theme #{i + 1}" } }
user
diff --git a/spec/fabricators/topic_allowed_group_fabricator.rb b/spec/fabricators/topic_allowed_group_fabricator.rb
index e864faf6f96..6a101148adc 100644
--- a/spec/fabricators/topic_allowed_group_fabricator.rb
+++ b/spec/fabricators/topic_allowed_group_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:topic_allowed_group) do
topic
group
diff --git a/spec/fabricators/topic_allowed_user_fabricator.rb b/spec/fabricators/topic_allowed_user_fabricator.rb
index 27c08d78b30..eb3d75f6e26 100644
--- a/spec/fabricators/topic_allowed_user_fabricator.rb
+++ b/spec/fabricators/topic_allowed_user_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:topic_allowed_user) do
user
end
diff --git a/spec/fabricators/topic_embed_fabricator.rb b/spec/fabricators/topic_embed_fabricator.rb
index d457f1e2096..7aace7a2a6f 100644
--- a/spec/fabricators/topic_embed_fabricator.rb
+++ b/spec/fabricators/topic_embed_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:topic_embed) do
post
topic { |te| te[:post].topic }
diff --git a/spec/fabricators/topic_fabricator.rb b/spec/fabricators/topic_fabricator.rb
index 4e276237a70..8fc0307929e 100644
--- a/spec/fabricators/topic_fabricator.rb
+++ b/spec/fabricators/topic_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:topic) do
user
title { sequence(:title) { |i| "This is a test topic #{i}" } }
diff --git a/spec/fabricators/topic_tag_fabricator.rb b/spec/fabricators/topic_tag_fabricator.rb
index 033f50656cd..79162de8505 100644
--- a/spec/fabricators/topic_tag_fabricator.rb
+++ b/spec/fabricators/topic_tag_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:topic_tag) do
tag
topic
diff --git a/spec/fabricators/topic_timer_fabricator.rb b/spec/fabricators/topic_timer_fabricator.rb
index 64122b66070..99bacf7cb5f 100644
--- a/spec/fabricators/topic_timer_fabricator.rb
+++ b/spec/fabricators/topic_timer_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:topic_timer) do
user
topic
diff --git a/spec/fabricators/topic_user_fabricator.rb b/spec/fabricators/topic_user_fabricator.rb
index b299806f707..11cf529a884 100644
--- a/spec/fabricators/topic_user_fabricator.rb
+++ b/spec/fabricators/topic_user_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:topic_user) do
user
topic
diff --git a/spec/fabricators/upload_fabricator.rb b/spec/fabricators/upload_fabricator.rb
index c1a6604be41..4c9f775fd44 100644
--- a/spec/fabricators/upload_fabricator.rb
+++ b/spec/fabricators/upload_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:upload) do
user
sha1 { sequence(:sha1) { |n| Digest::SHA1.hexdigest(n.to_s) } }
diff --git a/spec/fabricators/user_action_fabricator.rb b/spec/fabricators/user_action_fabricator.rb
index 201a78852ad..29beb6ab28f 100644
--- a/spec/fabricators/user_action_fabricator.rb
+++ b/spec/fabricators/user_action_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:user_action) do
user
action_type UserAction::BOOKMARK
diff --git a/spec/fabricators/user_api_key_fabricator.rb b/spec/fabricators/user_api_key_fabricator.rb
index ffcebb2c0cf..e513ac05de8 100644
--- a/spec/fabricators/user_api_key_fabricator.rb
+++ b/spec/fabricators/user_api_key_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:readonly_user_api_key, from: :user_api_key) do
user
scopes ['read']
diff --git a/spec/fabricators/user_avatar_fabricator.rb b/spec/fabricators/user_avatar_fabricator.rb
index 3cbd17cddc5..f7431bcbb17 100644
--- a/spec/fabricators/user_avatar_fabricator.rb
+++ b/spec/fabricators/user_avatar_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:user_avatar) do
user
end
diff --git a/spec/fabricators/user_email_fabricator.rb b/spec/fabricators/user_email_fabricator.rb
index 099b97fb3c7..75574ff8533 100644
--- a/spec/fabricators/user_email_fabricator.rb
+++ b/spec/fabricators/user_email_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:user_email) do
email { sequence(:email) { |i| "bruce#{i}@wayne.com" } }
primary true
diff --git a/spec/fabricators/user_fabricator.rb b/spec/fabricators/user_fabricator.rb
index 2a463d02559..45ccb590a3b 100644
--- a/spec/fabricators/user_fabricator.rb
+++ b/spec/fabricators/user_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:user_stat) do
end
diff --git a/spec/fabricators/user_field_fabricator.rb b/spec/fabricators/user_field_fabricator.rb
index 2e37eb3df41..c8019b390af 100644
--- a/spec/fabricators/user_field_fabricator.rb
+++ b/spec/fabricators/user_field_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:user_field) do
name { sequence(:name) { |i| "field_#{i}" } }
description "user field description"
diff --git a/spec/fabricators/user_option_fabricator.rb b/spec/fabricators/user_option_fabricator.rb
index f42ddaec9c0..17c0cbc788e 100644
--- a/spec/fabricators/user_option_fabricator.rb
+++ b/spec/fabricators/user_option_fabricator.rb
@@ -1,2 +1,4 @@
+# frozen_string_literal: true
+
Fabricator(:user_option) do
end
diff --git a/spec/fabricators/user_profile_fabricator.rb b/spec/fabricators/user_profile_fabricator.rb
index 38715eccf75..042474ed8bc 100644
--- a/spec/fabricators/user_profile_fabricator.rb
+++ b/spec/fabricators/user_profile_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:user_profile) do
bio_raw "I'm batman!"
user
diff --git a/spec/fabricators/user_second_factor_fabricator.rb b/spec/fabricators/user_second_factor_fabricator.rb
index 2064c4b0336..cbb2d5aa4ae 100644
--- a/spec/fabricators/user_second_factor_fabricator.rb
+++ b/spec/fabricators/user_second_factor_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:user_second_factor_totp, from: :user_second_factor) do
user
data 'rcyryaqage3jexfj'
diff --git a/spec/fabricators/watched_word_fabricator.rb b/spec/fabricators/watched_word_fabricator.rb
index 28838e1a949..b3796cad15b 100644
--- a/spec/fabricators/watched_word_fabricator.rb
+++ b/spec/fabricators/watched_word_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:watched_word) do
word { sequence(:word) { |i| "word#{i}" } }
action { WatchedWord.actions[:block] }
diff --git a/spec/fabricators/web_crawler_request_fabricator.rb b/spec/fabricators/web_crawler_request_fabricator.rb
index ed678cc8876..2d2be02fdf4 100644
--- a/spec/fabricators/web_crawler_request_fabricator.rb
+++ b/spec/fabricators/web_crawler_request_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:web_crawler_request) do
user_agent { sequence(:ua) { |i| "Googlebot #{i}.0" } }
date Time.zone.now.to_date
diff --git a/spec/fabricators/web_hook_fabricator.rb b/spec/fabricators/web_hook_fabricator.rb
index 8f73eda38cf..eff69dff40a 100644
--- a/spec/fabricators/web_hook_fabricator.rb
+++ b/spec/fabricators/web_hook_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
Fabricator(:web_hook) do
payload_url 'https://meta.discourse.org/webhook_listener'
content_type WebHook.content_types['application/json']
diff --git a/spec/fixtures/db/migrate/drop_table/20990309014014_drop_table.rb b/spec/fixtures/db/migrate/drop_table/20990309014014_drop_table.rb
index 923af0a207a..6657a5cae33 100644
--- a/spec/fixtures/db/migrate/drop_table/20990309014014_drop_table.rb
+++ b/spec/fixtures/db/migrate/drop_table/20990309014014_drop_table.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class DropTable < ActiveRecord::Migration[5.1]
def up
drop_table :email_logs
diff --git a/spec/fixtures/db/migrate/remove_column/20990309014014_remove_column.rb b/spec/fixtures/db/migrate/remove_column/20990309014014_remove_column.rb
index 25bc82b171a..7792775aaf6 100644
--- a/spec/fixtures/db/migrate/remove_column/20990309014014_remove_column.rb
+++ b/spec/fixtures/db/migrate/remove_column/20990309014014_remove_column.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class RemoveColumn < ActiveRecord::Migration[5.1]
def up
remove_column :users, :username
diff --git a/spec/fixtures/db/migrate/rename_column/20990309014014_rename_column.rb b/spec/fixtures/db/migrate/rename_column/20990309014014_rename_column.rb
index 1e0b568ada7..8c2b6b83108 100644
--- a/spec/fixtures/db/migrate/rename_column/20990309014014_rename_column.rb
+++ b/spec/fixtures/db/migrate/rename_column/20990309014014_rename_column.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class RenameColumn < ActiveRecord::Migration[5.1]
def up
rename_column :users, :username, :username1
diff --git a/spec/fixtures/db/migrate/rename_table/20990309014014_rename_table.rb b/spec/fixtures/db/migrate/rename_table/20990309014014_rename_table.rb
index 7aca85e1555..980f32333fe 100644
--- a/spec/fixtures/db/migrate/rename_table/20990309014014_rename_table.rb
+++ b/spec/fixtures/db/migrate/rename_table/20990309014014_rename_table.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class RenameTable < ActiveRecord::Migration[5.1]
def up
rename_table :users, :persons
diff --git a/spec/fixtures/db/post_migrate/drop_table/20990309014013_drop_email_logs_table.rb b/spec/fixtures/db/post_migrate/drop_table/20990309014013_drop_email_logs_table.rb
index aac6ac29dfc..1be76626a4e 100644
--- a/spec/fixtures/db/post_migrate/drop_table/20990309014013_drop_email_logs_table.rb
+++ b/spec/fixtures/db/post_migrate/drop_table/20990309014013_drop_email_logs_table.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class DropEmailLogsTable < ActiveRecord::Migration[5.2]
def up
drop_table :email_logs
diff --git a/spec/fixtures/plugins/csp_extension/plugin.rb b/spec/fixtures/plugins/csp_extension/plugin.rb
index c0b2332ca35..cfab239dd33 100644
--- a/spec/fixtures/plugins/csp_extension/plugin.rb
+++ b/spec/fixtures/plugins/csp_extension/plugin.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# name: csp_extension
# about: Fixture plugin that extends default CSP
# version: 1.0
diff --git a/spec/fixtures/plugins/custom_locales/plugin.rb b/spec/fixtures/plugins/custom_locales/plugin.rb
index 700c68cb5f8..d4b7304fa3f 100644
--- a/spec/fixtures/plugins/custom_locales/plugin.rb
+++ b/spec/fixtures/plugins/custom_locales/plugin.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# name: custom-locales
# about: Fixtures for plugin that adds new locales
# version: 1.0
diff --git a/spec/fixtures/plugins/my_plugin/plugin.rb b/spec/fixtures/plugins/my_plugin/plugin.rb
index 3a15aec00b2..9c2b5881b97 100644
--- a/spec/fixtures/plugins/my_plugin/plugin.rb
+++ b/spec/fixtures/plugins/my_plugin/plugin.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# name: plugin-name
# about: about: my plugin
# version: 0.1
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index e16c87499ce..e0ce7bb22d3 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ApplicationHelper do
diff --git a/spec/helpers/user_notifications_helper_spec.rb b/spec/helpers/user_notifications_helper_spec.rb
index f1aeb8a4c94..24c1d20935e 100644
--- a/spec/helpers/user_notifications_helper_spec.rb
+++ b/spec/helpers/user_notifications_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserNotificationsHelper do
diff --git a/spec/import_export/category_exporter_spec.rb b/spec/import_export/category_exporter_spec.rb
index 4ed57242bef..4d1125d180b 100644
--- a/spec/import_export/category_exporter_spec.rb
+++ b/spec/import_export/category_exporter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "import_export/category_exporter"
diff --git a/spec/import_export/category_structure_exporter_spec.rb b/spec/import_export/category_structure_exporter_spec.rb
index cb46123d07c..c741347adb8 100644
--- a/spec/import_export/category_structure_exporter_spec.rb
+++ b/spec/import_export/category_structure_exporter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "import_export/category_structure_exporter"
diff --git a/spec/import_export/importer_spec.rb b/spec/import_export/importer_spec.rb
index ae212046d2a..14e747eca57 100644
--- a/spec/import_export/importer_spec.rb
+++ b/spec/import_export/importer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "import_export/category_exporter"
require "import_export/category_structure_exporter"
diff --git a/spec/import_export/topic_exporter_spec.rb b/spec/import_export/topic_exporter_spec.rb
index 03edeff0464..62eeba0341a 100644
--- a/spec/import_export/topic_exporter_spec.rb
+++ b/spec/import_export/topic_exporter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "import_export/topic_exporter"
diff --git a/spec/integration/category_tag_spec.rb b/spec/integration/category_tag_spec.rb
index 13dcbe56ee7..ba6c93de649 100644
--- a/spec/integration/category_tag_spec.rb
+++ b/spec/integration/category_tag_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
require_dependency 'post_creator'
diff --git a/spec/integration/flags_spec.rb b/spec/integration/flags_spec.rb
index 12902917b36..87450af7482 100644
--- a/spec/integration/flags_spec.rb
+++ b/spec/integration/flags_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe PostAction do
diff --git a/spec/integration/invite_only_registration_spec.rb b/spec/integration/invite_only_registration_spec.rb
index a0eed2f65f1..6047bc054c3 100644
--- a/spec/integration/invite_only_registration_spec.rb
+++ b/spec/integration/invite_only_registration_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
diff --git a/spec/integration/multisite_spec.rb b/spec/integration/multisite_spec.rb
index 647b925fce2..4646cab0666 100644
--- a/spec/integration/multisite_spec.rb
+++ b/spec/integration/multisite_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# require 'rails_helper'
#
# describe 'multisite' do
diff --git a/spec/integration/rate_limiting_spec.rb b/spec/integration/rate_limiting_spec.rb
index 25a389cf9b0..87a58490d45 100644
--- a/spec/integration/rate_limiting_spec.rb
+++ b/spec/integration/rate_limiting_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
diff --git a/spec/integration/same_ip_spammers_spec.rb b/spec/integration/same_ip_spammers_spec.rb
index 827dba10d77..d0890624860 100644
--- a/spec/integration/same_ip_spammers_spec.rb
+++ b/spec/integration/same_ip_spammers_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
diff --git a/spec/integration/spam_rules_spec.rb b/spec/integration/spam_rules_spec.rb
index bcfa4930bdb..f9ec29ff584 100644
--- a/spec/integration/spam_rules_spec.rb
+++ b/spec/integration/spam_rules_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
diff --git a/spec/integration/topic_auto_close_spec.rb b/spec/integration/topic_auto_close_spec.rb
index 19ea2563df1..bd231687a4c 100644
--- a/spec/integration/topic_auto_close_spec.rb
+++ b/spec/integration/topic_auto_close_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
diff --git a/spec/integration/user_api_keys_spec.rb b/spec/integration/user_api_keys_spec.rb
index 1e43f53c065..24607b22d97 100644
--- a/spec/integration/user_api_keys_spec.rb
+++ b/spec/integration/user_api_keys_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe 'user api keys integration' do
diff --git a/spec/integration/watched_words_spec.rb b/spec/integration/watched_words_spec.rb
index 45bbdb21e2e..cbb8fc0d5a8 100644
--- a/spec/integration/watched_words_spec.rb
+++ b/spec/integration/watched_words_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe WatchedWord do
diff --git a/spec/integrity/i18n_spec.rb b/spec/integrity/i18n_spec.rb
index 6f0e11a8c09..4866ad2beac 100644
--- a/spec/integrity/i18n_spec.rb
+++ b/spec/integrity/i18n_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "i18n/duplicate_key_finder"
diff --git a/spec/integrity/onceoff_integrity_spec.rb b/spec/integrity/onceoff_integrity_spec.rb
index 8143fe79464..1d782f406b5 100644
--- a/spec/integrity/onceoff_integrity_spec.rb
+++ b/spec/integrity/onceoff_integrity_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe Jobs::Onceoff do
diff --git a/spec/integrity/site_setting_spec.rb b/spec/integrity/site_setting_spec.rb
index 3cf271cfbee..2d4dc271c7b 100644
--- a/spec/integrity/site_setting_spec.rb
+++ b/spec/integrity/site_setting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "i18n/duplicate_key_finder"
diff --git a/spec/jobs/about_stats_spec.rb b/spec/jobs/about_stats_spec.rb
index 2f761bf4e26..fbc423a6b0a 100644
--- a/spec/jobs/about_stats_spec.rb
+++ b/spec/jobs/about_stats_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::AboutStats do
diff --git a/spec/jobs/activation_reminder_emails_spec.rb b/spec/jobs/activation_reminder_emails_spec.rb
index eb283fec70e..1ce9c74a03f 100644
--- a/spec/jobs/activation_reminder_emails_spec.rb
+++ b/spec/jobs/activation_reminder_emails_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::ActivationReminderEmails do
diff --git a/spec/jobs/auto_expire_user_api_keys_spec.rb b/spec/jobs/auto_expire_user_api_keys_spec.rb
index a25ecfe2840..37da63ea85a 100644
--- a/spec/jobs/auto_expire_user_api_keys_spec.rb
+++ b/spec/jobs/auto_expire_user_api_keys_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::AutoExpireUserApiKeys do
diff --git a/spec/jobs/auto_queue_handler_spec.rb b/spec/jobs/auto_queue_handler_spec.rb
index 06efca0f7bd..2218faeada7 100644
--- a/spec/jobs/auto_queue_handler_spec.rb
+++ b/spec/jobs/auto_queue_handler_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::AutoQueueHandler do
diff --git a/spec/jobs/automatic_group_membership_spec.rb b/spec/jobs/automatic_group_membership_spec.rb
index 93758a56953..cb1544dab70 100644
--- a/spec/jobs/automatic_group_membership_spec.rb
+++ b/spec/jobs/automatic_group_membership_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/regular/automatic_group_membership'
diff --git a/spec/jobs/bulk_grant_trust_level_spec.rb b/spec/jobs/bulk_grant_trust_level_spec.rb
index 5db643b199b..47f4aad1e9b 100644
--- a/spec/jobs/bulk_grant_trust_level_spec.rb
+++ b/spec/jobs/bulk_grant_trust_level_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/regular/bulk_grant_trust_level'
diff --git a/spec/jobs/bulk_invite_spec.rb b/spec/jobs/bulk_invite_spec.rb
index 736d6f0ed0b..53bdcf2ec9d 100644
--- a/spec/jobs/bulk_invite_spec.rb
+++ b/spec/jobs/bulk_invite_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::BulkInvite do
diff --git a/spec/jobs/bump_topic_spec.rb b/spec/jobs/bump_topic_spec.rb
index 1f90d54db2b..a52c0d20f8c 100644
--- a/spec/jobs/bump_topic_spec.rb
+++ b/spec/jobs/bump_topic_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::BumpTopic do
diff --git a/spec/jobs/clean_up_associated_accounts_spec.rb b/spec/jobs/clean_up_associated_accounts_spec.rb
index 38502b8fb74..c1f23bf3a55 100644
--- a/spec/jobs/clean_up_associated_accounts_spec.rb
+++ b/spec/jobs/clean_up_associated_accounts_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::CleanUpAssociatedAccounts do
diff --git a/spec/jobs/clean_up_crawler_stats_spec.rb b/spec/jobs/clean_up_crawler_stats_spec.rb
index 46c069e9e6f..c649a36dc00 100644
--- a/spec/jobs/clean_up_crawler_stats_spec.rb
+++ b/spec/jobs/clean_up_crawler_stats_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::CleanUpCrawlerStats do
diff --git a/spec/jobs/clean_up_deprecated_url_site_settings_spec.rb b/spec/jobs/clean_up_deprecated_url_site_settings_spec.rb
index 677e9c541e0..8d5dcd4d74c 100644
--- a/spec/jobs/clean_up_deprecated_url_site_settings_spec.rb
+++ b/spec/jobs/clean_up_deprecated_url_site_settings_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::CleanUpDeprecatedUrlSiteSettings do
diff --git a/spec/jobs/clean_up_email_logs_spec.rb b/spec/jobs/clean_up_email_logs_spec.rb
index 779d1961313..2e987333ade 100644
--- a/spec/jobs/clean_up_email_logs_spec.rb
+++ b/spec/jobs/clean_up_email_logs_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::CleanUpEmailLogs do
diff --git a/spec/jobs/clean_up_inactive_users_spec.rb b/spec/jobs/clean_up_inactive_users_spec.rb
index d0c357b93d6..68e68bcd4a6 100644
--- a/spec/jobs/clean_up_inactive_users_spec.rb
+++ b/spec/jobs/clean_up_inactive_users_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::CleanUpInactiveUsers do
diff --git a/spec/jobs/clean_up_post_reply_keys_spec.rb b/spec/jobs/clean_up_post_reply_keys_spec.rb
index 97b3cc3a178..99a0c6968ce 100644
--- a/spec/jobs/clean_up_post_reply_keys_spec.rb
+++ b/spec/jobs/clean_up_post_reply_keys_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::CleanUpPostReplyKeys do
diff --git a/spec/jobs/clean_up_unused_staged_users_spec.rb b/spec/jobs/clean_up_unused_staged_users_spec.rb
index 2fd222c0e8a..9140c765c7f 100644
--- a/spec/jobs/clean_up_unused_staged_users_spec.rb
+++ b/spec/jobs/clean_up_unused_staged_users_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::CleanUpUnusedStagedUsers do
diff --git a/spec/jobs/clean_up_uploads_spec.rb b/spec/jobs/clean_up_uploads_spec.rb
index 0fad4b4c26e..0f7e20704bd 100644
--- a/spec/jobs/clean_up_uploads_spec.rb
+++ b/spec/jobs/clean_up_uploads_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/scheduled/clean_up_uploads'
diff --git a/spec/jobs/correct_missing_dualstack_urls_spec.rb b/spec/jobs/correct_missing_dualstack_urls_spec.rb
index 329678c21e0..08d20351857 100644
--- a/spec/jobs/correct_missing_dualstack_urls_spec.rb
+++ b/spec/jobs/correct_missing_dualstack_urls_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/onceoff/correct_missing_dualstack_urls'
diff --git a/spec/jobs/crawl_topic_link_spec.rb b/spec/jobs/crawl_topic_link_spec.rb
index 8e01178b44e..ffeaa601141 100644
--- a/spec/jobs/crawl_topic_link_spec.rb
+++ b/spec/jobs/crawl_topic_link_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/base'
require_dependency 'jobs/regular/crawl_topic_link'
diff --git a/spec/jobs/create_missing_avatars_spec.rb b/spec/jobs/create_missing_avatars_spec.rb
index c57f7f6c543..3832e7e9742 100644
--- a/spec/jobs/create_missing_avatars_spec.rb
+++ b/spec/jobs/create_missing_avatars_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/scheduled/create_missing_avatars'
diff --git a/spec/jobs/create_user_reviewable_spec.rb b/spec/jobs/create_user_reviewable_spec.rb
index c9b54fd62e0..d30e218a838 100644
--- a/spec/jobs/create_user_reviewable_spec.rb
+++ b/spec/jobs/create_user_reviewable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/regular/create_user_reviewable'
diff --git a/spec/jobs/delete_topic_spec.rb b/spec/jobs/delete_topic_spec.rb
index a1621b52721..4acf85d69f7 100644
--- a/spec/jobs/delete_topic_spec.rb
+++ b/spec/jobs/delete_topic_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::DeleteTopic do
diff --git a/spec/jobs/disable_bootstrap_mode_spec.rb b/spec/jobs/disable_bootstrap_mode_spec.rb
index b8be00bf4d2..46001c3a179 100644
--- a/spec/jobs/disable_bootstrap_mode_spec.rb
+++ b/spec/jobs/disable_bootstrap_mode_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::DisableBootstrapMode do
diff --git a/spec/jobs/download_avatar_from_url_spec.rb b/spec/jobs/download_avatar_from_url_spec.rb
index 6758a647a0f..98785c0c876 100644
--- a/spec/jobs/download_avatar_from_url_spec.rb
+++ b/spec/jobs/download_avatar_from_url_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::DownloadAvatarFromUrl do
diff --git a/spec/jobs/download_backup_email_spec.rb b/spec/jobs/download_backup_email_spec.rb
index 5c389750f92..488db8dbbd1 100644
--- a/spec/jobs/download_backup_email_spec.rb
+++ b/spec/jobs/download_backup_email_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::DownloadBackupEmail do
diff --git a/spec/jobs/download_profile_background_from_url_spec.rb b/spec/jobs/download_profile_background_from_url_spec.rb
index a7913cc73c9..ca66a51d363 100644
--- a/spec/jobs/download_profile_background_from_url_spec.rb
+++ b/spec/jobs/download_profile_background_from_url_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::DownloadProfileBackgroundFromUrl do
diff --git a/spec/jobs/emit_web_hook_event_spec.rb b/spec/jobs/emit_web_hook_event_spec.rb
index 505de48d9d1..0426e346ca2 100644
--- a/spec/jobs/emit_web_hook_event_spec.rb
+++ b/spec/jobs/emit_web_hook_event_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'excon'
diff --git a/spec/jobs/enable_bootstrap_mode_spec.rb b/spec/jobs/enable_bootstrap_mode_spec.rb
index 8cf653b46fd..0562f4ab701 100644
--- a/spec/jobs/enable_bootstrap_mode_spec.rb
+++ b/spec/jobs/enable_bootstrap_mode_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::EnableBootstrapMode do
diff --git a/spec/jobs/enqueue_digest_emails_spec.rb b/spec/jobs/enqueue_digest_emails_spec.rb
index 7b257b46add..b6ee0188494 100644
--- a/spec/jobs/enqueue_digest_emails_spec.rb
+++ b/spec/jobs/enqueue_digest_emails_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/base'
diff --git a/spec/jobs/export_csv_file_spec.rb b/spec/jobs/export_csv_file_spec.rb
index 76b0923aac9..eb076e6d815 100644
--- a/spec/jobs/export_csv_file_spec.rb
+++ b/spec/jobs/export_csv_file_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::ExportCsvFile do
diff --git a/spec/jobs/feature_topic_users_spec.rb b/spec/jobs/feature_topic_users_spec.rb
index 5d34ff74c94..8afc87125c6 100644
--- a/spec/jobs/feature_topic_users_spec.rb
+++ b/spec/jobs/feature_topic_users_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/base'
require 'jobs/regular/process_post'
diff --git a/spec/jobs/fix_out_of_sync_user_uploaded_avatar_spec.rb b/spec/jobs/fix_out_of_sync_user_uploaded_avatar_spec.rb
index c32a84315a8..cd146361626 100644
--- a/spec/jobs/fix_out_of_sync_user_uploaded_avatar_spec.rb
+++ b/spec/jobs/fix_out_of_sync_user_uploaded_avatar_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::FixOutOfSyncUserUploadedAvatar do
diff --git a/spec/jobs/fix_primary_emails_for_staged_users_spec.rb b/spec/jobs/fix_primary_emails_for_staged_users_spec.rb
index 66637506162..a93d5ae8e41 100644
--- a/spec/jobs/fix_primary_emails_for_staged_users_spec.rb
+++ b/spec/jobs/fix_primary_emails_for_staged_users_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::FixPrimaryEmailsForStagedUsers do
diff --git a/spec/jobs/fix_s3_etags_spec.rb b/spec/jobs/fix_s3_etags_spec.rb
index 85ad2aa61e3..fbe15de58f4 100644
--- a/spec/jobs/fix_s3_etags_spec.rb
+++ b/spec/jobs/fix_s3_etags_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::FixS3Etags do
diff --git a/spec/jobs/fix_user_usernames_and_group_names_clash_spec.rb b/spec/jobs/fix_user_usernames_and_group_names_clash_spec.rb
index 3b209acf4fd..bfb9e5b8ca2 100644
--- a/spec/jobs/fix_user_usernames_and_group_names_clash_spec.rb
+++ b/spec/jobs/fix_user_usernames_and_group_names_clash_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::FixUserUsernamesAndGroupNamesClash do
diff --git a/spec/jobs/grant_anniversary_badges_spec.rb b/spec/jobs/grant_anniversary_badges_spec.rb
index a73a4b719d0..d60b6291d51 100644
--- a/spec/jobs/grant_anniversary_badges_spec.rb
+++ b/spec/jobs/grant_anniversary_badges_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/scheduled/grant_anniversary_badges'
diff --git a/spec/jobs/grant_new_user_of_the_month_badges_spec.rb b/spec/jobs/grant_new_user_of_the_month_badges_spec.rb
index d7616f62032..db3b65a4244 100644
--- a/spec/jobs/grant_new_user_of_the_month_badges_spec.rb
+++ b/spec/jobs/grant_new_user_of_the_month_badges_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/scheduled/grant_new_user_of_the_month_badges'
diff --git a/spec/jobs/heartbeat_spec.rb b/spec/jobs/heartbeat_spec.rb
index f9d90380ddb..315fe4172bc 100644
--- a/spec/jobs/heartbeat_spec.rb
+++ b/spec/jobs/heartbeat_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/base'
diff --git a/spec/jobs/ignored_users_summary_spec.rb b/spec/jobs/ignored_users_summary_spec.rb
index 1d01e823996..fa41210cfd4 100644
--- a/spec/jobs/ignored_users_summary_spec.rb
+++ b/spec/jobs/ignored_users_summary_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/scheduled/ignored_users_summary'
diff --git a/spec/jobs/invalidate_inactive_admins_spec.rb b/spec/jobs/invalidate_inactive_admins_spec.rb
index 0348e5af586..baf3ce65192 100644
--- a/spec/jobs/invalidate_inactive_admins_spec.rb
+++ b/spec/jobs/invalidate_inactive_admins_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/scheduled/invalidate_inactive_admins'
diff --git a/spec/jobs/invite_email_spec.rb b/spec/jobs/invite_email_spec.rb
index 9d31a761da2..270123c7f93 100644
--- a/spec/jobs/invite_email_spec.rb
+++ b/spec/jobs/invite_email_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/base'
diff --git a/spec/jobs/jobs_base_spec.rb b/spec/jobs/jobs_base_spec.rb
index b1ec54c5a8c..a107fea9eb4 100644
--- a/spec/jobs/jobs_base_spec.rb
+++ b/spec/jobs/jobs_base_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/base'
diff --git a/spec/jobs/jobs_spec.rb b/spec/jobs/jobs_spec.rb
index 0922aa1aa4a..0f4c00c1cee 100644
--- a/spec/jobs/jobs_spec.rb
+++ b/spec/jobs/jobs_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/base'
diff --git a/spec/jobs/migrate_url_site_settings_spec.rb b/spec/jobs/migrate_url_site_settings_spec.rb
index 823e5b70a92..8e61632e289 100644
--- a/spec/jobs/migrate_url_site_settings_spec.rb
+++ b/spec/jobs/migrate_url_site_settings_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::MigrateUrlSiteSettings do
diff --git a/spec/jobs/notify_mailing_list_subscribers_spec.rb b/spec/jobs/notify_mailing_list_subscribers_spec.rb
index a2be03645da..506f2b0c460 100644
--- a/spec/jobs/notify_mailing_list_subscribers_spec.rb
+++ b/spec/jobs/notify_mailing_list_subscribers_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe Jobs::NotifyMailingListSubscribers do
diff --git a/spec/jobs/notify_moved_posts_spec.rb b/spec/jobs/notify_moved_posts_spec.rb
index 19474e998d4..271fa950f54 100644
--- a/spec/jobs/notify_moved_posts_spec.rb
+++ b/spec/jobs/notify_moved_posts_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/base'
require_dependency 'jobs/regular/process_post'
diff --git a/spec/jobs/notify_reviewable_spec.rb b/spec/jobs/notify_reviewable_spec.rb
index 588fbc8901a..69866c9da78 100644
--- a/spec/jobs/notify_reviewable_spec.rb
+++ b/spec/jobs/notify_reviewable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::NotifyReviewable do
diff --git a/spec/jobs/pending_queued_posts_reminder_spec.rb b/spec/jobs/pending_queued_posts_reminder_spec.rb
index 4cbd5f5518b..cc5bd387bb3 100644
--- a/spec/jobs/pending_queued_posts_reminder_spec.rb
+++ b/spec/jobs/pending_queued_posts_reminder_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe Jobs::PendingQueuedPostReminder do
diff --git a/spec/jobs/pending_reviewables_reminder_spec.rb b/spec/jobs/pending_reviewables_reminder_spec.rb
index cad9433bbae..71ac8b56e26 100644
--- a/spec/jobs/pending_reviewables_reminder_spec.rb
+++ b/spec/jobs/pending_reviewables_reminder_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::PendingReviewablesReminder do
diff --git a/spec/jobs/pending_users_reminder_spec.rb b/spec/jobs/pending_users_reminder_spec.rb
index ce118df93cb..1f14b9210b9 100644
--- a/spec/jobs/pending_users_reminder_spec.rb
+++ b/spec/jobs/pending_users_reminder_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::PendingUsersReminder do
diff --git a/spec/jobs/periodical_updates_spec.rb b/spec/jobs/periodical_updates_spec.rb
index 47f4282215f..788efe6adea 100644
--- a/spec/jobs/periodical_updates_spec.rb
+++ b/spec/jobs/periodical_updates_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/scheduled/periodical_updates'
diff --git a/spec/jobs/poll_feed_spec.rb b/spec/jobs/poll_feed_spec.rb
index 830648d9faf..24b09f7db89 100644
--- a/spec/jobs/poll_feed_spec.rb
+++ b/spec/jobs/poll_feed_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/regular/process_post'
diff --git a/spec/jobs/poll_mailbox_spec.rb b/spec/jobs/poll_mailbox_spec.rb
index b4efaff95ec..90f59a7f05d 100644
--- a/spec/jobs/poll_mailbox_spec.rb
+++ b/spec/jobs/poll_mailbox_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/regular/process_post'
diff --git a/spec/jobs/post_uploads_recovery_spec.rb b/spec/jobs/post_uploads_recovery_spec.rb
index b415008d9ca..9ec73d4e91b 100644
--- a/spec/jobs/post_uploads_recovery_spec.rb
+++ b/spec/jobs/post_uploads_recovery_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::PostUploadsRecovery do
diff --git a/spec/jobs/process_email_spec.rb b/spec/jobs/process_email_spec.rb
index f740a8f2b14..bd828f7f794 100644
--- a/spec/jobs/process_email_spec.rb
+++ b/spec/jobs/process_email_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe Jobs::ProcessEmail do
diff --git a/spec/jobs/process_post_spec.rb b/spec/jobs/process_post_spec.rb
index 137eb176db9..5dd207e2398 100644
--- a/spec/jobs/process_post_spec.rb
+++ b/spec/jobs/process_post_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'jobs/regular/process_post'
diff --git a/spec/jobs/publish_topic_to_category_spec.rb b/spec/jobs/publish_topic_to_category_spec.rb
index 99f4f1fe70a..27e8a71cbbd 100644
--- a/spec/jobs/publish_topic_to_category_spec.rb
+++ b/spec/jobs/publish_topic_to_category_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::PublishTopicToCategory do
diff --git a/spec/jobs/pull_hotlinked_images_spec.rb b/spec/jobs/pull_hotlinked_images_spec.rb
index bd40c412c31..f4a65b3850f 100644
--- a/spec/jobs/pull_hotlinked_images_spec.rb
+++ b/spec/jobs/pull_hotlinked_images_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'jobs/regular/pull_hotlinked_images'
diff --git a/spec/jobs/purge_expired_ignored_users_spec.rb b/spec/jobs/purge_expired_ignored_users_spec.rb
index 3fac279adfa..707fe20c523 100644
--- a/spec/jobs/purge_expired_ignored_users_spec.rb
+++ b/spec/jobs/purge_expired_ignored_users_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/scheduled/purge_expired_ignored_users'
diff --git a/spec/jobs/rebake_custom_emoji_posts_spec.rb b/spec/jobs/rebake_custom_emoji_posts_spec.rb
index 026e36bdc32..adaf3ad97d8 100644
--- a/spec/jobs/rebake_custom_emoji_posts_spec.rb
+++ b/spec/jobs/rebake_custom_emoji_posts_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Jobs::RebakeCustomEmojiPosts do
diff --git a/spec/jobs/recover_user_profile_backgrounds_spec.rb b/spec/jobs/recover_user_profile_backgrounds_spec.rb
index 27a3851eab9..42a2ec26089 100644
--- a/spec/jobs/recover_user_profile_backgrounds_spec.rb
+++ b/spec/jobs/recover_user_profile_backgrounds_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/onceoff/recover_user_profile_backgrounds'
diff --git a/spec/jobs/reindex_search_spec.rb b/spec/jobs/reindex_search_spec.rb
index 50b1fe93a11..63a4b367a33 100644
--- a/spec/jobs/reindex_search_spec.rb
+++ b/spec/jobs/reindex_search_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::ReindexSearch do
diff --git a/spec/jobs/send_system_message_spec.rb b/spec/jobs/send_system_message_spec.rb
index 23723e8d03f..09f8a5962b2 100644
--- a/spec/jobs/send_system_message_spec.rb
+++ b/spec/jobs/send_system_message_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'jobs/regular/send_system_message'
diff --git a/spec/jobs/suspicious_login_spec.rb b/spec/jobs/suspicious_login_spec.rb
index c1e9aa3dc18..8e1ecef2362 100644
--- a/spec/jobs/suspicious_login_spec.rb
+++ b/spec/jobs/suspicious_login_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::SuspiciousLogin do
diff --git a/spec/jobs/tl3_promotions_spec.rb b/spec/jobs/tl3_promotions_spec.rb
index 2a13f32e660..abfa8ebc8f9 100644
--- a/spec/jobs/tl3_promotions_spec.rb
+++ b/spec/jobs/tl3_promotions_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::Tl3Promotions do
diff --git a/spec/jobs/toggle_topic_closed_spec.rb b/spec/jobs/toggle_topic_closed_spec.rb
index 22873f13b70..f52031ddb73 100644
--- a/spec/jobs/toggle_topic_closed_spec.rb
+++ b/spec/jobs/toggle_topic_closed_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::ToggleTopicClosed do
diff --git a/spec/jobs/topic_reminder_spec.rb b/spec/jobs/topic_reminder_spec.rb
index f77bfd214cb..74e8affa4ee 100644
--- a/spec/jobs/topic_reminder_spec.rb
+++ b/spec/jobs/topic_reminder_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::TopicReminder do
diff --git a/spec/jobs/truncate_user_flag_stats_spec.rb b/spec/jobs/truncate_user_flag_stats_spec.rb
index 7ededb51e69..03e12314244 100644
--- a/spec/jobs/truncate_user_flag_stats_spec.rb
+++ b/spec/jobs/truncate_user_flag_stats_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::TruncateUserFlagStats do
diff --git a/spec/jobs/unsilence_users_spec.rb b/spec/jobs/unsilence_users_spec.rb
index 3f16350297a..1570a4f8954 100644
--- a/spec/jobs/unsilence_users_spec.rb
+++ b/spec/jobs/unsilence_users_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe Jobs::UnsilenceUsers do
diff --git a/spec/jobs/update_gravatar_spec.rb b/spec/jobs/update_gravatar_spec.rb
index 6dcd52876ef..3be1af26159 100644
--- a/spec/jobs/update_gravatar_spec.rb
+++ b/spec/jobs/update_gravatar_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Jobs::UpdateGravatar do
diff --git a/spec/jobs/update_s3_inventory_spec.rb b/spec/jobs/update_s3_inventory_spec.rb
index 07241cea0b7..3ba60f2f1dc 100644
--- a/spec/jobs/update_s3_inventory_spec.rb
+++ b/spec/jobs/update_s3_inventory_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require "file_store/s3_store"
diff --git a/spec/jobs/user_email_spec.rb b/spec/jobs/user_email_spec.rb
index 9131960bb36..8eb2f95394e 100644
--- a/spec/jobs/user_email_spec.rb
+++ b/spec/jobs/user_email_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'jobs/base'
diff --git a/spec/lib/backup_restore/local_backup_store_spec.rb b/spec/lib/backup_restore/local_backup_store_spec.rb
index 440e0a6b964..50e1a368459 100644
--- a/spec/lib/backup_restore/local_backup_store_spec.rb
+++ b/spec/lib/backup_restore/local_backup_store_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'backup_restore/local_backup_store'
require_relative 'shared_examples_for_backup_store'
diff --git a/spec/lib/backup_restore/restorer_spec.rb b/spec/lib/backup_restore/restorer_spec.rb
index b5c7cae5c7b..1cd1dd698eb 100644
--- a/spec/lib/backup_restore/restorer_spec.rb
+++ b/spec/lib/backup_restore/restorer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe BackupRestore::Restorer do
diff --git a/spec/lib/backup_restore/s3_backup_store_spec.rb b/spec/lib/backup_restore/s3_backup_store_spec.rb
index b17f60916d2..52251284cc9 100644
--- a/spec/lib/backup_restore/s3_backup_store_spec.rb
+++ b/spec/lib/backup_restore/s3_backup_store_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'backup_restore/s3_backup_store'
require_relative 'shared_examples_for_backup_store'
diff --git a/spec/lib/backup_restore/shared_examples_for_backup_store.rb b/spec/lib/backup_restore/shared_examples_for_backup_store.rb
index cd5f5430db6..679bc9aa79e 100644
--- a/spec/lib/backup_restore/shared_examples_for_backup_store.rb
+++ b/spec/lib/backup_restore/shared_examples_for_backup_store.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_context "backups" do
before { create_backups }
after(:all) { remove_backups }
diff --git a/spec/lib/browser_detection_spec.rb b/spec/lib/browser_detection_spec.rb
index f67a7c07072..9c1f75f18f4 100644
--- a/spec/lib/browser_detection_spec.rb
+++ b/spec/lib/browser_detection_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'browser_detection'
diff --git a/spec/lib/db_helper_spec.rb b/spec/lib/db_helper_spec.rb
index d9573bb547e..3f9d98e7096 100644
--- a/spec/lib/db_helper_spec.rb
+++ b/spec/lib/db_helper_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'db_helper'
diff --git a/spec/lib/encodings_spec.rb b/spec/lib/encodings_spec.rb
index 3e63fd3855c..bdbde95f3d4 100644
--- a/spec/lib/encodings_spec.rb
+++ b/spec/lib/encodings_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Encodings do
diff --git a/spec/lib/introduction_updater_spec.rb b/spec/lib/introduction_updater_spec.rb
index 3494e12deb5..66f91a6341f 100644
--- a/spec/lib/introduction_updater_spec.rb
+++ b/spec/lib/introduction_updater_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'introduction_updater'
diff --git a/spec/lib/mini_sql_multisite_connection_spec.rb b/spec/lib/mini_sql_multisite_connection_spec.rb
index 4522e8b5e8a..4d404a4c926 100644
--- a/spec/lib/mini_sql_multisite_connection_spec.rb
+++ b/spec/lib/mini_sql_multisite_connection_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe MiniSqlMultisiteConnection do
diff --git a/spec/lib/seed_data/categories_spec.rb b/spec/lib/seed_data/categories_spec.rb
index c36e5f4bc5d..90a58cd996b 100644
--- a/spec/lib/seed_data/categories_spec.rb
+++ b/spec/lib/seed_data/categories_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'seed_data/categories'
diff --git a/spec/lib/seed_data/topics_spec.rb b/spec/lib/seed_data/topics_spec.rb
index 30ed3d7bcfa..be4b355248d 100644
--- a/spec/lib/seed_data/topics_spec.rb
+++ b/spec/lib/seed_data/topics_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'seed_data/topics'
diff --git a/spec/lib/site_settings/validations_spec.rb b/spec/lib/site_settings/validations_spec.rb
index 66de975da06..bed04da1570 100644
--- a/spec/lib/site_settings/validations_spec.rb
+++ b/spec/lib/site_settings/validations_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'site_settings/validations'
diff --git a/spec/lib/theme_javascript_compiler_spec.rb b/spec/lib/theme_javascript_compiler_spec.rb
index 3ae1fd110fd..a43db0ef495 100644
--- a/spec/lib/theme_javascript_compiler_spec.rb
+++ b/spec/lib/theme_javascript_compiler_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'theme_javascript_compiler'
diff --git a/spec/lib/upload_creator_spec.rb b/spec/lib/upload_creator_spec.rb
index 0c2120deeb8..d32e7b34f43 100644
--- a/spec/lib/upload_creator_spec.rb
+++ b/spec/lib/upload_creator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'file_store/s3_store'
diff --git a/spec/lib/upload_recovery_spec.rb b/spec/lib/upload_recovery_spec.rb
index 79eccb2e302..0d6892365e4 100644
--- a/spec/lib/upload_recovery_spec.rb
+++ b/spec/lib/upload_recovery_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency "upload_recovery"
diff --git a/spec/mailers/invite_mailer_spec.rb b/spec/mailers/invite_mailer_spec.rb
index dc1b60fe307..d760501003a 100644
--- a/spec/mailers/invite_mailer_spec.rb
+++ b/spec/mailers/invite_mailer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe InviteMailer do
diff --git a/spec/mailers/rejection_mailer_spec.rb b/spec/mailers/rejection_mailer_spec.rb
index 0062f609f95..51219abafdf 100644
--- a/spec/mailers/rejection_mailer_spec.rb
+++ b/spec/mailers/rejection_mailer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe RejectionMailer do
diff --git a/spec/mailers/test_mailer_spec.rb b/spec/mailers/test_mailer_spec.rb
index 68308ef0bed..ab624be7c0d 100644
--- a/spec/mailers/test_mailer_spec.rb
+++ b/spec/mailers/test_mailer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe TestMailer do
diff --git a/spec/mailers/user_notifications_spec.rb b/spec/mailers/user_notifications_spec.rb
index 09bc56c6a67..ca839c13514 100644
--- a/spec/mailers/user_notifications_spec.rb
+++ b/spec/mailers/user_notifications_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe UserNotifications do
@@ -180,7 +182,7 @@ describe UserNotifications do
it "excludes posts that are newer than editing grace period" do
SiteSetting.editing_grace_period = 5.minutes
too_new = Fabricate(:topic, user: Fabricate(:user), title: "Oops I need to edit this", created_at: 1.minute.ago)
- too_new_post = Fabricate(:post, user: too_new.user, topic: too_new, score: 100.0, post_number: 1, created_at: 1.minute.ago)
+ _too_new_post = Fabricate(:post, user: too_new.user, topic: too_new, score: 100.0, post_number: 1, created_at: 1.minute.ago)
html = subject.html_part.body.to_s
expect(html).to_not include too_new.title
end
@@ -767,7 +769,7 @@ describe UserNotifications do
context "when customized" do
let(:custom_body) do
- body = <<~BODY
+ body = +<<~BODY
You are now officially notified.
%{header_instructions}
%{message} %{respond_instructions}
diff --git a/spec/mailers/version_mailer_spec.rb b/spec/mailers/version_mailer_spec.rb
index 24b45d0309f..5baba5b6ef5 100644
--- a/spec/mailers/version_mailer_spec.rb
+++ b/spec/mailers/version_mailer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe VersionMailer do
diff --git a/spec/models/about_spec.rb b/spec/models/about_spec.rb
index 145c1acbe47..ea93c798941 100644
--- a/spec/models/about_spec.rb
+++ b/spec/models/about_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe About do
diff --git a/spec/models/admin_dashboard_problem_spec.rb b/spec/models/admin_dashboard_problem_spec.rb
index 8df2a32f5ff..5629eeb11b5 100644
--- a/spec/models/admin_dashboard_problem_spec.rb
+++ b/spec/models/admin_dashboard_problem_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe AdminDashboardData do
diff --git a/spec/models/api_key_spec.rb b/spec/models/api_key_spec.rb
index 5196c16eb50..3a3d978c3ce 100644
--- a/spec/models/api_key_spec.rb
+++ b/spec/models/api_key_spec.rb
@@ -1,4 +1,6 @@
# encoding: utf-8
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'api_key'
diff --git a/spec/models/application_request_spec.rb b/spec/models/application_request_spec.rb
index 256af7a52f8..249d3ca23ca 100644
--- a/spec/models/application_request_spec.rb
+++ b/spec/models/application_request_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ApplicationRequest do
diff --git a/spec/models/badge_spec.rb b/spec/models/badge_spec.rb
index e704c9cd043..eefb238ea84 100644
--- a/spec/models/badge_spec.rb
+++ b/spec/models/badge_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'badge'
diff --git a/spec/models/badge_type_spec.rb b/spec/models/badge_type_spec.rb
index 17a91a9aee3..b5a35b14c8b 100644
--- a/spec/models/badge_type_spec.rb
+++ b/spec/models/badge_type_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'badge_type'
diff --git a/spec/models/category_featured_topic_spec.rb b/spec/models/category_featured_topic_spec.rb
index 1fbb32ba4f3..bd4f1e0506d 100644
--- a/spec/models/category_featured_topic_spec.rb
+++ b/spec/models/category_featured_topic_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe CategoryFeaturedTopic do
diff --git a/spec/models/category_group_spec.rb b/spec/models/category_group_spec.rb
index d884f7f91e7..bfc8439315b 100644
--- a/spec/models/category_group_spec.rb
+++ b/spec/models/category_group_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe CategoryGroup do
diff --git a/spec/models/category_list_spec.rb b/spec/models/category_list_spec.rb
index 3bba4856c91..108e09b4a12 100644
--- a/spec/models/category_list_spec.rb
+++ b/spec/models/category_list_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'category_list'
diff --git a/spec/models/category_spec.rb b/spec/models/category_spec.rb
index c7695476215..a7755e0f7fc 100644
--- a/spec/models/category_spec.rb
+++ b/spec/models/category_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require_dependency 'post_creator'
diff --git a/spec/models/category_user_spec.rb b/spec/models/category_user_spec.rb
index f95d758f177..f87bec3269d 100644
--- a/spec/models/category_user_spec.rb
+++ b/spec/models/category_user_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require_dependency 'post_creator'
diff --git a/spec/models/child_theme_spec.rb b/spec/models/child_theme_spec.rb
index 8925accb300..13ebf27a11c 100644
--- a/spec/models/child_theme_spec.rb
+++ b/spec/models/child_theme_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ChildTheme do
diff --git a/spec/models/color_scheme_color_spec.rb b/spec/models/color_scheme_color_spec.rb
index 933698255ed..9cbea2b110c 100644
--- a/spec/models/color_scheme_color_spec.rb
+++ b/spec/models/color_scheme_color_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ColorSchemeColor do
diff --git a/spec/models/color_scheme_spec.rb b/spec/models/color_scheme_spec.rb
index fcc23866b09..7fa3aa679d9 100644
--- a/spec/models/color_scheme_spec.rb
+++ b/spec/models/color_scheme_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ColorScheme do
diff --git a/spec/models/developer_spec.rb b/spec/models/developer_spec.rb
index 6775c0ba517..6591b9b9c6e 100644
--- a/spec/models/developer_spec.rb
+++ b/spec/models/developer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Developer do
diff --git a/spec/models/digest_email_site_setting_spec.rb b/spec/models/digest_email_site_setting_spec.rb
index cebcfb2342b..60149ae83b6 100644
--- a/spec/models/digest_email_site_setting_spec.rb
+++ b/spec/models/digest_email_site_setting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe DigestEmailSiteSetting do
diff --git a/spec/models/directory_item_spec.rb b/spec/models/directory_item_spec.rb
index 619d18eb697..b2465e070d7 100644
--- a/spec/models/directory_item_spec.rb
+++ b/spec/models/directory_item_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe DirectoryItem do
diff --git a/spec/models/discourse_single_sign_on_spec.rb b/spec/models/discourse_single_sign_on_spec.rb
index 0a5acd32679..80bb92184a3 100644
--- a/spec/models/discourse_single_sign_on_spec.rb
+++ b/spec/models/discourse_single_sign_on_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe DiscourseSingleSignOn do
diff --git a/spec/models/draft_sequence_spec.rb b/spec/models/draft_sequence_spec.rb
index fa74a70400d..92ce3d298c0 100644
--- a/spec/models/draft_sequence_spec.rb
+++ b/spec/models/draft_sequence_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe DraftSequence do
diff --git a/spec/models/draft_spec.rb b/spec/models/draft_spec.rb
index 09983a3b8a8..d10d132ef57 100644
--- a/spec/models/draft_spec.rb
+++ b/spec/models/draft_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Draft do
diff --git a/spec/models/email_change_request_spec.rb b/spec/models/email_change_request_spec.rb
index 030dc13ec95..8a8acf20f9c 100644
--- a/spec/models/email_change_request_spec.rb
+++ b/spec/models/email_change_request_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe EmailChangeRequest do
diff --git a/spec/models/email_log_spec.rb b/spec/models/email_log_spec.rb
index f0f60dabb0c..806648e944c 100644
--- a/spec/models/email_log_spec.rb
+++ b/spec/models/email_log_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe EmailLog do
diff --git a/spec/models/email_token_spec.rb b/spec/models/email_token_spec.rb
index 454845b5fc5..29f7f908254 100644
--- a/spec/models/email_token_spec.rb
+++ b/spec/models/email_token_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe EmailToken do
diff --git a/spec/models/embeddable_host_spec.rb b/spec/models/embeddable_host_spec.rb
index 33d8b2ba35c..13fa4f019b6 100644
--- a/spec/models/embeddable_host_spec.rb
+++ b/spec/models/embeddable_host_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe EmbeddableHost do
diff --git a/spec/models/emoji_spec.rb b/spec/models/emoji_spec.rb
index 228fdda14b3..16283245c46 100644
--- a/spec/models/emoji_spec.rb
+++ b/spec/models/emoji_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Emoji do
diff --git a/spec/models/given_daily_like_spec.rb b/spec/models/given_daily_like_spec.rb
index 0216c30b041..01c5d6a4de1 100644
--- a/spec/models/given_daily_like_spec.rb
+++ b/spec/models/given_daily_like_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe GivenDailyLike do
diff --git a/spec/models/global_setting_spec.rb b/spec/models/global_setting_spec.rb
index e3fd9a9f515..1a8d58b2de9 100644
--- a/spec/models/global_setting_spec.rb
+++ b/spec/models/global_setting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'tempfile'
diff --git a/spec/models/group_history_spec.rb b/spec/models/group_history_spec.rb
index 55f6de4c449..dafa6162479 100644
--- a/spec/models/group_history_spec.rb
+++ b/spec/models/group_history_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe GroupHistory do
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index 425187e4af2..1981efec4ab 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Group do
diff --git a/spec/models/group_user_spec.rb b/spec/models/group_user_spec.rb
index c7675984cf1..0004aeeb84a 100644
--- a/spec/models/group_user_spec.rb
+++ b/spec/models/group_user_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe GroupUser do
diff --git a/spec/models/incoming_link_spec.rb b/spec/models/incoming_link_spec.rb
index 962396a9e3f..ad1dad561c1 100644
--- a/spec/models/incoming_link_spec.rb
+++ b/spec/models/incoming_link_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe IncomingLink do
diff --git a/spec/models/incoming_links_report_spec.rb b/spec/models/incoming_links_report_spec.rb
index ac3ac2dd6fa..d2ae9230b30 100644
--- a/spec/models/incoming_links_report_spec.rb
+++ b/spec/models/incoming_links_report_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe IncomingLinksReport do
diff --git a/spec/models/invite_redeemer_spec.rb b/spec/models/invite_redeemer_spec.rb
index 45291b6937c..33987f1f2c1 100644
--- a/spec/models/invite_redeemer_spec.rb
+++ b/spec/models/invite_redeemer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe InviteRedeemer do
diff --git a/spec/models/invite_spec.rb b/spec/models/invite_spec.rb
index bdf7a02faa4..3b91bf50b8e 100644
--- a/spec/models/invite_spec.rb
+++ b/spec/models/invite_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Invite do
diff --git a/spec/models/locale_site_setting_spec.rb b/spec/models/locale_site_setting_spec.rb
index 06406385eb1..947ee5e5cec 100644
--- a/spec/models/locale_site_setting_spec.rb
+++ b/spec/models/locale_site_setting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe LocaleSiteSetting do
diff --git a/spec/models/mailing_list_mode_site_setting_spec.rb b/spec/models/mailing_list_mode_site_setting_spec.rb
index 88267fde4d5..0a9a86fca1c 100644
--- a/spec/models/mailing_list_mode_site_setting_spec.rb
+++ b/spec/models/mailing_list_mode_site_setting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe MailingListModeSiteSetting do
diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb
index 1365001df0d..ffead071eed 100644
--- a/spec/models/notification_spec.rb
+++ b/spec/models/notification_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Notification do
diff --git a/spec/models/optimized_image_spec.rb b/spec/models/optimized_image_spec.rb
index d3094631e1f..defb1d21175 100644
--- a/spec/models/optimized_image_spec.rb
+++ b/spec/models/optimized_image_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe OptimizedImage do
diff --git a/spec/models/permalink_spec.rb b/spec/models/permalink_spec.rb
index 131fbeae5e8..15c47b0032e 100644
--- a/spec/models/permalink_spec.rb
+++ b/spec/models/permalink_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe Permalink do
diff --git a/spec/models/plugin_store_spec.rb b/spec/models/plugin_store_spec.rb
index fc53e3e390e..b134339d452 100644
--- a/spec/models/plugin_store_spec.rb
+++ b/spec/models/plugin_store_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require_dependency "plugin_store"
diff --git a/spec/models/post_action_spec.rb b/spec/models/post_action_spec.rb
index 9f05b32ccb3..29bd1a9b81a 100644
--- a/spec/models/post_action_spec.rb
+++ b/spec/models/post_action_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostAction do
diff --git a/spec/models/post_action_type_spec.rb b/spec/models/post_action_type_spec.rb
index 7408ed6693c..465c0849c37 100644
--- a/spec/models/post_action_type_spec.rb
+++ b/spec/models/post_action_type_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostActionType do
diff --git a/spec/models/post_analyzer_spec.rb b/spec/models/post_analyzer_spec.rb
index f7e20efc1e6..ed3000b8913 100644
--- a/spec/models/post_analyzer_spec.rb
+++ b/spec/models/post_analyzer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostAnalyzer do
diff --git a/spec/models/post_detail_spec.rb b/spec/models/post_detail_spec.rb
index 7697a412523..7c5bdedf5a1 100644
--- a/spec/models/post_detail_spec.rb
+++ b/spec/models/post_detail_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostDetail do
diff --git a/spec/models/post_mover_spec.rb b/spec/models/post_mover_spec.rb
index 836c186ed82..c7eb777bd84 100644
--- a/spec/models/post_mover_spec.rb
+++ b/spec/models/post_mover_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostMover do
diff --git a/spec/models/post_reply_key_spec.rb b/spec/models/post_reply_key_spec.rb
index 631e6cd6a2e..d4f21b99d39 100644
--- a/spec/models/post_reply_key_spec.rb
+++ b/spec/models/post_reply_key_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe PostReplyKey do
diff --git a/spec/models/post_reply_spec.rb b/spec/models/post_reply_spec.rb
index 64a07ec3560..f4a1b30e071 100644
--- a/spec/models/post_reply_spec.rb
+++ b/spec/models/post_reply_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostReply do
diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb
index 8b242454674..d993dc420cf 100644
--- a/spec/models/post_spec.rb
+++ b/spec/models/post_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Post do
diff --git a/spec/models/post_timing_spec.rb b/spec/models/post_timing_spec.rb
index fc095e37c53..b09a84881ea 100644
--- a/spec/models/post_timing_spec.rb
+++ b/spec/models/post_timing_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostTiming do
diff --git a/spec/models/post_upload_spec.rb b/spec/models/post_upload_spec.rb
index 9830844d670..f1d51b9cf01 100644
--- a/spec/models/post_upload_spec.rb
+++ b/spec/models/post_upload_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostUpload do
diff --git a/spec/models/quoted_post_spec.rb b/spec/models/quoted_post_spec.rb
index fbe0429c34b..a40025400e2 100644
--- a/spec/models/quoted_post_spec.rb
+++ b/spec/models/quoted_post_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe QuotedPost do
@@ -28,7 +30,7 @@ describe QuotedPost do
SiteSetting.editing_grace_period = 1.minute.to_i
post5 = create_post(topic: topic, post_number: 5, raw: "post 5")
- raw.sub!(post3.full_url, post5.full_url)
+ raw = raw.sub(post3.full_url, post5.full_url)
post4.revise(post4.user, { raw: raw }, revised_at: post4.updated_at + 2.minutes)
expect(QuotedPost.where(post_id: post4.id).pluck(:quoted_post_id)).to contain_exactly(post1.id, post2.id, post5.id)
end
diff --git a/spec/models/remote_theme_spec.rb b/spec/models/remote_theme_spec.rb
index 2a9ae32ae7d..018fc6f6061 100644
--- a/spec/models/remote_theme_spec.rb
+++ b/spec/models/remote_theme_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe RemoteTheme do
diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb
index 6843ac9af55..6b8ef0d8099 100644
--- a/spec/models/report_spec.rb
+++ b/spec/models/report_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Report do
diff --git a/spec/models/reviewable_flagged_post_spec.rb b/spec/models/reviewable_flagged_post_spec.rb
index 956173eea1e..9a6b185069a 100644
--- a/spec/models/reviewable_flagged_post_spec.rb
+++ b/spec/models/reviewable_flagged_post_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ReviewableFlaggedPost, type: :model do
diff --git a/spec/models/reviewable_history_spec.rb b/spec/models/reviewable_history_spec.rb
index bb8b7bb7cd0..322745a9f8a 100644
--- a/spec/models/reviewable_history_spec.rb
+++ b/spec/models/reviewable_history_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ReviewableHistory, type: :model do
diff --git a/spec/models/reviewable_queued_post_spec.rb b/spec/models/reviewable_queued_post_spec.rb
index 6075f4d4729..55076154f09 100644
--- a/spec/models/reviewable_queued_post_spec.rb
+++ b/spec/models/reviewable_queued_post_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ReviewableQueuedPost, type: :model do
diff --git a/spec/models/reviewable_score_spec.rb b/spec/models/reviewable_score_spec.rb
index b32d5a7250e..e64859c0f2f 100644
--- a/spec/models/reviewable_score_spec.rb
+++ b/spec/models/reviewable_score_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ReviewableScore, type: :model do
diff --git a/spec/models/reviewable_spec.rb b/spec/models/reviewable_spec.rb
index 6b855c93a1e..8d1539f55cb 100644
--- a/spec/models/reviewable_spec.rb
+++ b/spec/models/reviewable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Reviewable, type: :model do
diff --git a/spec/models/reviewable_user_spec.rb b/spec/models/reviewable_user_spec.rb
index ba8f9929cd2..e59c07146f3 100644
--- a/spec/models/reviewable_user_spec.rb
+++ b/spec/models/reviewable_user_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ReviewableUser, type: :model do
diff --git a/spec/models/s3_region_site_setting_spec.rb b/spec/models/s3_region_site_setting_spec.rb
index 8749986801c..bf29c3b19c7 100644
--- a/spec/models/s3_region_site_setting_spec.rb
+++ b/spec/models/s3_region_site_setting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe S3RegionSiteSetting do
diff --git a/spec/models/screened_email_spec.rb b/spec/models/screened_email_spec.rb
index af4e82c43da..bb2bc0c4be5 100644
--- a/spec/models/screened_email_spec.rb
+++ b/spec/models/screened_email_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ScreenedEmail do
diff --git a/spec/models/screened_ip_address_spec.rb b/spec/models/screened_ip_address_spec.rb
index 2b8a8d82f80..89de5796205 100644
--- a/spec/models/screened_ip_address_spec.rb
+++ b/spec/models/screened_ip_address_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ScreenedIpAddress do
diff --git a/spec/models/screened_url_spec.rb b/spec/models/screened_url_spec.rb
index 8335784ecd1..828ed8991c5 100644
--- a/spec/models/screened_url_spec.rb
+++ b/spec/models/screened_url_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ScreenedUrl do
diff --git a/spec/models/search_log_spec.rb b/spec/models/search_log_spec.rb
index 995252ee265..5cc2be0a05e 100644
--- a/spec/models/search_log_spec.rb
+++ b/spec/models/search_log_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe SearchLog, type: :model do
diff --git a/spec/models/site_setting_spec.rb b/spec/models/site_setting_spec.rb
index 6c6f556c29d..0eb553ee997 100644
--- a/spec/models/site_setting_spec.rb
+++ b/spec/models/site_setting_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'site_setting'
require_dependency 'site_setting_extension'
diff --git a/spec/models/site_spec.rb b/spec/models/site_spec.rb
index 399600b84f6..b90011e8669 100644
--- a/spec/models/site_spec.rb
+++ b/spec/models/site_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'site'
diff --git a/spec/models/skipped_email_log_spec.rb b/spec/models/skipped_email_log_spec.rb
index a498e49f4a2..4f168a81d8b 100644
--- a/spec/models/skipped_email_log_spec.rb
+++ b/spec/models/skipped_email_log_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe SkippedEmailLog, type: :model do
diff --git a/spec/models/stylesheet_cache_spec.rb b/spec/models/stylesheet_cache_spec.rb
index f42bc379bab..c83f6c57869 100644
--- a/spec/models/stylesheet_cache_spec.rb
+++ b/spec/models/stylesheet_cache_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe StylesheetCache do
diff --git a/spec/models/tag_group_spec.rb b/spec/models/tag_group_spec.rb
index a5f1e57893f..d8fd5702057 100644
--- a/spec/models/tag_group_spec.rb
+++ b/spec/models/tag_group_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TagGroup do
diff --git a/spec/models/tag_spec.rb b/spec/models/tag_spec.rb
index a48081bf7d6..88ac08ded58 100644
--- a/spec/models/tag_spec.rb
+++ b/spec/models/tag_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Tag do
diff --git a/spec/models/tag_user_spec.rb b/spec/models/tag_user_spec.rb
index 555277c6f67..773a0127d46 100644
--- a/spec/models/tag_user_spec.rb
+++ b/spec/models/tag_user_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require_dependency 'post_creator'
diff --git a/spec/models/theme_field_spec.rb b/spec/models/theme_field_spec.rb
index a68b4056cb2..3b8c93f2343 100644
--- a/spec/models/theme_field_spec.rb
+++ b/spec/models/theme_field_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
diff --git a/spec/models/theme_spec.rb b/spec/models/theme_spec.rb
index 786f592feb1..1c634ebd7e0 100644
--- a/spec/models/theme_spec.rb
+++ b/spec/models/theme_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Theme do
diff --git a/spec/models/top_menu_item_spec.rb b/spec/models/top_menu_item_spec.rb
index 2027edbf3a9..44550f1b77e 100644
--- a/spec/models/top_menu_item_spec.rb
+++ b/spec/models/top_menu_item_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopMenuItem do
diff --git a/spec/models/top_topic_spec.rb b/spec/models/top_topic_spec.rb
index 1d83694f68e..e085982e95c 100644
--- a/spec/models/top_topic_spec.rb
+++ b/spec/models/top_topic_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopTopic do
diff --git a/spec/models/topic_allowed_user_spec.rb b/spec/models/topic_allowed_user_spec.rb
index 6b78330900c..6ddf0f3a215 100644
--- a/spec/models/topic_allowed_user_spec.rb
+++ b/spec/models/topic_allowed_user_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicAllowedUser do
diff --git a/spec/models/topic_converter_spec.rb b/spec/models/topic_converter_spec.rb
index f25b26a4254..f37fd1436e4 100644
--- a/spec/models/topic_converter_spec.rb
+++ b/spec/models/topic_converter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicConverter do
diff --git a/spec/models/topic_embed_spec.rb b/spec/models/topic_embed_spec.rb
index b9e1247929b..b6c61f1f7a4 100644
--- a/spec/models/topic_embed_spec.rb
+++ b/spec/models/topic_embed_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'stringio'
diff --git a/spec/models/topic_featured_users_spec.rb b/spec/models/topic_featured_users_spec.rb
index b874854d6be..d6869e296c1 100644
--- a/spec/models/topic_featured_users_spec.rb
+++ b/spec/models/topic_featured_users_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicFeaturedUsers do
diff --git a/spec/models/topic_invite_spec.rb b/spec/models/topic_invite_spec.rb
index 8c55ee1ca79..a51725d5263 100644
--- a/spec/models/topic_invite_spec.rb
+++ b/spec/models/topic_invite_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicInvite do
diff --git a/spec/models/topic_link_click_spec.rb b/spec/models/topic_link_click_spec.rb
index 20da8c354ad..1b72ed253e8 100644
--- a/spec/models/topic_link_click_spec.rb
+++ b/spec/models/topic_link_click_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicLinkClick do
diff --git a/spec/models/topic_link_spec.rb b/spec/models/topic_link_spec.rb
index 8c7cea0a4a4..b80e86007a2 100644
--- a/spec/models/topic_link_spec.rb
+++ b/spec/models/topic_link_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicLink do
diff --git a/spec/models/topic_list_spec.rb b/spec/models/topic_list_spec.rb
index d5022065f79..23e958a169f 100644
--- a/spec/models/topic_list_spec.rb
+++ b/spec/models/topic_list_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicList do
diff --git a/spec/models/topic_participants_summary_spec.rb b/spec/models/topic_participants_summary_spec.rb
index 830b3e45c3e..ac62f95eefc 100644
--- a/spec/models/topic_participants_summary_spec.rb
+++ b/spec/models/topic_participants_summary_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicParticipantsSummary do
diff --git a/spec/models/topic_posters_summary_spec.rb b/spec/models/topic_posters_summary_spec.rb
index 928e772b654..74f32a196dc 100644
--- a/spec/models/topic_posters_summary_spec.rb
+++ b/spec/models/topic_posters_summary_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicPostersSummary do
diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rb
index 50d5a86c4f0..0180d94c48f 100644
--- a/spec/models/topic_spec.rb
+++ b/spec/models/topic_spec.rb
@@ -1,4 +1,5 @@
# encoding: utf-8
+# frozen_string_literal: true
require 'rails_helper'
require_dependency 'post_destroyer'
diff --git a/spec/models/topic_tag_spec.rb b/spec/models/topic_tag_spec.rb
index c944ecd4999..84d70abbc4b 100644
--- a/spec/models/topic_tag_spec.rb
+++ b/spec/models/topic_tag_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicTag do
diff --git a/spec/models/topic_timer_spec.rb b/spec/models/topic_timer_spec.rb
index cf7f7826151..7145aaab069 100644
--- a/spec/models/topic_timer_spec.rb
+++ b/spec/models/topic_timer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe TopicTimer, type: :model do
diff --git a/spec/models/topic_tracking_state_spec.rb b/spec/models/topic_tracking_state_spec.rb
index 73a124814aa..2c1f7f7f879 100644
--- a/spec/models/topic_tracking_state_spec.rb
+++ b/spec/models/topic_tracking_state_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicTrackingState do
diff --git a/spec/models/topic_user_spec.rb b/spec/models/topic_user_spec.rb
index 6b348b73725..66012f3385b 100644
--- a/spec/models/topic_user_spec.rb
+++ b/spec/models/topic_user_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicUser do
diff --git a/spec/models/topic_view_item_spec.rb b/spec/models/topic_view_item_spec.rb
index da0762d8718..37ccf58c082 100644
--- a/spec/models/topic_view_item_spec.rb
+++ b/spec/models/topic_view_item_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicViewItem do
diff --git a/spec/models/translation_override_spec.rb b/spec/models/translation_override_spec.rb
index c6b214fac5e..7b122e45674 100644
--- a/spec/models/translation_override_spec.rb
+++ b/spec/models/translation_override_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TranslationOverride do
diff --git a/spec/models/trust_level3_requirements_spec.rb b/spec/models/trust_level3_requirements_spec.rb
index ba9bbd8818d..17289c50b59 100644
--- a/spec/models/trust_level3_requirements_spec.rb
+++ b/spec/models/trust_level3_requirements_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TrustLevel3Requirements do
diff --git a/spec/models/unsubscribe_key_spec.rb b/spec/models/unsubscribe_key_spec.rb
index 3ef9842ea40..44eba0849d5 100644
--- a/spec/models/unsubscribe_key_spec.rb
+++ b/spec/models/unsubscribe_key_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'unsubscribe_key'
diff --git a/spec/models/upload_spec.rb b/spec/models/upload_spec.rb
index 493255976e1..6549cca701d 100644
--- a/spec/models/upload_spec.rb
+++ b/spec/models/upload_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Upload do
diff --git a/spec/models/user_action_spec.rb b/spec/models/user_action_spec.rb
index a3542662914..b9efe0cb206 100644
--- a/spec/models/user_action_spec.rb
+++ b/spec/models/user_action_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserAction do
diff --git a/spec/models/user_api_key_spec.rb b/spec/models/user_api_key_spec.rb
index 9543f01ee1b..0337d44ddd8 100644
--- a/spec/models/user_api_key_spec.rb
+++ b/spec/models/user_api_key_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserApiKey do
diff --git a/spec/models/user_archived_message_spec.rb b/spec/models/user_archived_message_spec.rb
index 73f1a3e2601..d225b5bb360 100644
--- a/spec/models/user_archived_message_spec.rb
+++ b/spec/models/user_archived_message_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserArchivedMessage do
diff --git a/spec/models/user_auth_token_spec.rb b/spec/models/user_auth_token_spec.rb
index 8e17c25335b..8af6366ea90 100644
--- a/spec/models/user_auth_token_spec.rb
+++ b/spec/models/user_auth_token_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'discourse_ip_info'
diff --git a/spec/models/user_avatar_spec.rb b/spec/models/user_avatar_spec.rb
index d30a334beff..59f1e2112a8 100644
--- a/spec/models/user_avatar_spec.rb
+++ b/spec/models/user_avatar_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserAvatar do
diff --git a/spec/models/user_badge_spec.rb b/spec/models/user_badge_spec.rb
index cd36201a209..4088f6c95c2 100644
--- a/spec/models/user_badge_spec.rb
+++ b/spec/models/user_badge_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'user_badge'
diff --git a/spec/models/user_email_spec.rb b/spec/models/user_email_spec.rb
index a2f34fdb11c..1e53a56f93f 100644
--- a/spec/models/user_email_spec.rb
+++ b/spec/models/user_email_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'user_email'
diff --git a/spec/models/user_export_spec.rb b/spec/models/user_export_spec.rb
index 0431d01b830..636ab6eca3d 100644
--- a/spec/models/user_export_spec.rb
+++ b/spec/models/user_export_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe UserExport do
diff --git a/spec/models/user_field_spec.rb b/spec/models/user_field_spec.rb
index f75dafe8f8e..7f545b3706d 100644
--- a/spec/models/user_field_spec.rb
+++ b/spec/models/user_field_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserField do
diff --git a/spec/models/user_history_spec.rb b/spec/models/user_history_spec.rb
index b5c8a6bf800..ba5879b30d5 100644
--- a/spec/models/user_history_spec.rb
+++ b/spec/models/user_history_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserHistory do
diff --git a/spec/models/user_open_id_spec.rb b/spec/models/user_open_id_spec.rb
index b7113f2ff89..e6ce156d737 100644
--- a/spec/models/user_open_id_spec.rb
+++ b/spec/models/user_open_id_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserOpenId do
diff --git a/spec/models/user_option_spec.rb b/spec/models/user_option_spec.rb
index 62d40fcdb57..c7e22f762ea 100644
--- a/spec/models/user_option_spec.rb
+++ b/spec/models/user_option_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'user_option'
diff --git a/spec/models/user_profile_spec.rb b/spec/models/user_profile_spec.rb
index c52427b5136..0f661f1fb78 100644
--- a/spec/models/user_profile_spec.rb
+++ b/spec/models/user_profile_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserProfile do
diff --git a/spec/models/user_profile_view_spec.rb b/spec/models/user_profile_view_spec.rb
index 75c235a3b23..4e5fc7fb0c9 100644
--- a/spec/models/user_profile_view_spec.rb
+++ b/spec/models/user_profile_view_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe UserProfileView do
diff --git a/spec/models/user_search_spec.rb b/spec/models/user_search_spec.rb
index 4f6487d1f32..3973a78d6ac 100644
--- a/spec/models/user_search_spec.rb
+++ b/spec/models/user_search_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserSearch do
diff --git a/spec/models/user_second_factor_spec.rb b/spec/models/user_second_factor_spec.rb
index e76974659fb..5fce70aa31f 100644
--- a/spec/models/user_second_factor_spec.rb
+++ b/spec/models/user_second_factor_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe UserSecondFactor do
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 7dd33bfe43b..a5795c952b8 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'user'
diff --git a/spec/models/user_stat_spec.rb b/spec/models/user_stat_spec.rb
index cff85f51dc4..0a9bd72ff0e 100644
--- a/spec/models/user_stat_spec.rb
+++ b/spec/models/user_stat_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserStat do
diff --git a/spec/models/user_summary_spec.rb b/spec/models/user_summary_spec.rb
index 0b7453d453a..791e61b6e1c 100644
--- a/spec/models/user_summary_spec.rb
+++ b/spec/models/user_summary_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserSummary do
diff --git a/spec/models/user_visit_spec.rb b/spec/models/user_visit_spec.rb
index 7532c73cb4f..219b7594ee2 100644
--- a/spec/models/user_visit_spec.rb
+++ b/spec/models/user_visit_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserVisit do
diff --git a/spec/models/username_validator_spec.rb b/spec/models/username_validator_spec.rb
index e85f613220d..eb45a229982 100644
--- a/spec/models/username_validator_spec.rb
+++ b/spec/models/username_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UsernameValidator do
diff --git a/spec/models/watched_word_spec.rb b/spec/models/watched_word_spec.rb
index f4cc34bc102..31d4f2fae63 100644
--- a/spec/models/watched_word_spec.rb
+++ b/spec/models/watched_word_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe WatchedWord do
diff --git a/spec/models/web_crawler_request_spec.rb b/spec/models/web_crawler_request_spec.rb
index 03f8da5a866..c77a7be1523 100644
--- a/spec/models/web_crawler_request_spec.rb
+++ b/spec/models/web_crawler_request_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe WebCrawlerRequest do
diff --git a/spec/models/web_hook_event_spec.rb b/spec/models/web_hook_event_spec.rb
index b09b3c30ed0..6275f30fda0 100644
--- a/spec/models/web_hook_event_spec.rb
+++ b/spec/models/web_hook_event_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe WebHookEvent do
diff --git a/spec/models/web_hook_spec.rb b/spec/models/web_hook_spec.rb
index 7444616e59a..aa6a7f6d6b0 100644
--- a/spec/models/web_hook_spec.rb
+++ b/spec/models/web_hook_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe WebHook do
diff --git a/spec/multisite/distributed_cache_spec.rb b/spec/multisite/distributed_cache_spec.rb
index 7306fc20ec7..8a427f760c9 100644
--- a/spec/multisite/distributed_cache_spec.rb
+++ b/spec/multisite/distributed_cache_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe 'Multisite SiteSettings', type: :multisite do
diff --git a/spec/multisite/jobs_spec.rb b/spec/multisite/jobs_spec.rb
index 7fbbe33f4c3..461ede83a7d 100644
--- a/spec/multisite/jobs_spec.rb
+++ b/spec/multisite/jobs_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe "Running Sidekiq Jobs in Multisite", type: :multisite do
diff --git a/spec/multisite/pausable_spec.rb b/spec/multisite/pausable_spec.rb
index 1b4302fc841..5bc1262af97 100644
--- a/spec/multisite/pausable_spec.rb
+++ b/spec/multisite/pausable_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'sidekiq/pausable'
diff --git a/spec/multisite/s3_store_spec.rb b/spec/multisite/s3_store_spec.rb
index f6175a4fcab..1e4634b8899 100644
--- a/spec/multisite/s3_store_spec.rb
+++ b/spec/multisite/s3_store_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'file_store/s3_store'
diff --git a/spec/multisite/site_settings_spec.rb b/spec/multisite/site_settings_spec.rb
index a01182e3b59..069c2663524 100644
--- a/spec/multisite/site_settings_spec.rb
+++ b/spec/multisite/site_settings_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe 'Multisite SiteSettings', type: :multisite do
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index 549735f8aaa..4dcdabefcd6 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
if ENV['COVERAGE']
require 'simplecov'
SimpleCov.start
diff --git a/spec/requests/about_controller_spec.rb b/spec/requests/about_controller_spec.rb
index 541333c4614..6c58284979f 100644
--- a/spec/requests/about_controller_spec.rb
+++ b/spec/requests/about_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe AboutController do
diff --git a/spec/requests/admin/admin_controller_spec.rb b/spec/requests/admin/admin_controller_spec.rb
index 062f3a3a0e5..f1f76c276af 100644
--- a/spec/requests/admin/admin_controller_spec.rb
+++ b/spec/requests/admin/admin_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Admin::AdminController do
diff --git a/spec/requests/admin/api_controller_spec.rb b/spec/requests/admin/api_controller_spec.rb
index 9cf3b6dc730..e52fb1b2b24 100644
--- a/spec/requests/admin/api_controller_spec.rb
+++ b/spec/requests/admin/api_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::ApiController do
diff --git a/spec/requests/admin/backups_controller_spec.rb b/spec/requests/admin/backups_controller_spec.rb
index 1b663babd0c..a5019ebfd68 100644
--- a/spec/requests/admin/backups_controller_spec.rb
+++ b/spec/requests/admin/backups_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Admin::BackupsController do
diff --git a/spec/requests/admin/badges_controller_spec.rb b/spec/requests/admin/badges_controller_spec.rb
index add572d95f0..fc34a5b3a4b 100644
--- a/spec/requests/admin/badges_controller_spec.rb
+++ b/spec/requests/admin/badges_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::BadgesController do
diff --git a/spec/requests/admin/color_schemes_controller_spec.rb b/spec/requests/admin/color_schemes_controller_spec.rb
index f3c59e3c016..0c5b4161698 100644
--- a/spec/requests/admin/color_schemes_controller_spec.rb
+++ b/spec/requests/admin/color_schemes_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::ColorSchemesController do
diff --git a/spec/requests/admin/dashboard_controller_spec.rb b/spec/requests/admin/dashboard_controller_spec.rb
index 5d269792676..69955aea2db 100644
--- a/spec/requests/admin/dashboard_controller_spec.rb
+++ b/spec/requests/admin/dashboard_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'discourse_version_check'
diff --git a/spec/requests/admin/email_controller_spec.rb b/spec/requests/admin/email_controller_spec.rb
index 8f41da60433..533518b8592 100644
--- a/spec/requests/admin/email_controller_spec.rb
+++ b/spec/requests/admin/email_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::EmailController do
diff --git a/spec/requests/admin/email_templates_controller_spec.rb b/spec/requests/admin/email_templates_controller_spec.rb
index b0d3a0a0550..c76b29f516d 100644
--- a/spec/requests/admin/email_templates_controller_spec.rb
+++ b/spec/requests/admin/email_templates_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Admin::EmailTemplatesController do
diff --git a/spec/requests/admin/embeddable_hosts_controller_spec.rb b/spec/requests/admin/embeddable_hosts_controller_spec.rb
index fc7353a66fc..f1da980601b 100644
--- a/spec/requests/admin/embeddable_hosts_controller_spec.rb
+++ b/spec/requests/admin/embeddable_hosts_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::EmbeddableHostsController do
diff --git a/spec/requests/admin/embedding_controller_spec.rb b/spec/requests/admin/embedding_controller_spec.rb
index 9531c3a6187..71b00e4f630 100644
--- a/spec/requests/admin/embedding_controller_spec.rb
+++ b/spec/requests/admin/embedding_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::EmbeddingController do
diff --git a/spec/requests/admin/emojis_controller_spec.rb b/spec/requests/admin/emojis_controller_spec.rb
index 24019fc343a..ae274fafec3 100644
--- a/spec/requests/admin/emojis_controller_spec.rb
+++ b/spec/requests/admin/emojis_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Admin::EmojisController do
diff --git a/spec/requests/admin/flagged_topics_controller_spec.rb b/spec/requests/admin/flagged_topics_controller_spec.rb
index 7456afa524b..b6918253b2f 100644
--- a/spec/requests/admin/flagged_topics_controller_spec.rb
+++ b/spec/requests/admin/flagged_topics_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Admin::FlaggedTopicsController do
diff --git a/spec/requests/admin/flags_controller_spec.rb b/spec/requests/admin/flags_controller_spec.rb
index b1436e33b3b..f97e0046532 100644
--- a/spec/requests/admin/flags_controller_spec.rb
+++ b/spec/requests/admin/flags_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Admin::FlagsController do
diff --git a/spec/requests/admin/groups_controller_spec.rb b/spec/requests/admin/groups_controller_spec.rb
index 955bf78592d..0fe648b39d1 100644
--- a/spec/requests/admin/groups_controller_spec.rb
+++ b/spec/requests/admin/groups_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Admin::GroupsController do
diff --git a/spec/requests/admin/impersonate_controller_spec.rb b/spec/requests/admin/impersonate_controller_spec.rb
index 3cb2657330d..8eef5244e47 100644
--- a/spec/requests/admin/impersonate_controller_spec.rb
+++ b/spec/requests/admin/impersonate_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::ImpersonateController do
diff --git a/spec/requests/admin/permalinks_controller_spec.rb b/spec/requests/admin/permalinks_controller_spec.rb
index c0fa35abde4..16eb3dd1210 100644
--- a/spec/requests/admin/permalinks_controller_spec.rb
+++ b/spec/requests/admin/permalinks_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::PermalinksController do
diff --git a/spec/requests/admin/plugins_controller_spec.rb b/spec/requests/admin/plugins_controller_spec.rb
index 57175ebbb4b..75b1b5f21ed 100644
--- a/spec/requests/admin/plugins_controller_spec.rb
+++ b/spec/requests/admin/plugins_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::PluginsController do
diff --git a/spec/requests/admin/reports_controller_spec.rb b/spec/requests/admin/reports_controller_spec.rb
index 6110184781b..ee1b36d2e89 100644
--- a/spec/requests/admin/reports_controller_spec.rb
+++ b/spec/requests/admin/reports_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::ReportsController do
diff --git a/spec/requests/admin/screened_emails_controller_spec.rb b/spec/requests/admin/screened_emails_controller_spec.rb
index 8d9ce25032f..e1e3b41ebbf 100644
--- a/spec/requests/admin/screened_emails_controller_spec.rb
+++ b/spec/requests/admin/screened_emails_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::ScreenedEmailsController do
diff --git a/spec/requests/admin/screened_ip_addresses_controller_spec.rb b/spec/requests/admin/screened_ip_addresses_controller_spec.rb
index 7737b1ee53f..d69bd643ac0 100644
--- a/spec/requests/admin/screened_ip_addresses_controller_spec.rb
+++ b/spec/requests/admin/screened_ip_addresses_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::ScreenedIpAddressesController do
diff --git a/spec/requests/admin/screened_urls_controller_spec.rb b/spec/requests/admin/screened_urls_controller_spec.rb
index e4d4ba05e9a..32af969c6fc 100644
--- a/spec/requests/admin/screened_urls_controller_spec.rb
+++ b/spec/requests/admin/screened_urls_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::ScreenedUrlsController do
diff --git a/spec/requests/admin/search_logs_spec.rb b/spec/requests/admin/search_logs_spec.rb
index 60a80fca93d..4dcaa12f17d 100644
--- a/spec/requests/admin/search_logs_spec.rb
+++ b/spec/requests/admin/search_logs_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Admin::SearchLogsController do
diff --git a/spec/requests/admin/site_settings_controller_spec.rb b/spec/requests/admin/site_settings_controller_spec.rb
index 56428afaa6e..411691305c9 100644
--- a/spec/requests/admin/site_settings_controller_spec.rb
+++ b/spec/requests/admin/site_settings_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::SiteSettingsController do
diff --git a/spec/requests/admin/site_texts_controller_spec.rb b/spec/requests/admin/site_texts_controller_spec.rb
index a706588ea9c..b6e02ac5cda 100644
--- a/spec/requests/admin/site_texts_controller_spec.rb
+++ b/spec/requests/admin/site_texts_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Admin::SiteTextsController do
diff --git a/spec/requests/admin/staff_action_logs_controller_spec.rb b/spec/requests/admin/staff_action_logs_controller_spec.rb
index 68d43696963..a10ab6dd3a4 100644
--- a/spec/requests/admin/staff_action_logs_controller_spec.rb
+++ b/spec/requests/admin/staff_action_logs_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::StaffActionLogsController do
diff --git a/spec/requests/admin/themes_controller_spec.rb b/spec/requests/admin/themes_controller_spec.rb
index 0de5b0f9c95..c0067d920d5 100644
--- a/spec/requests/admin/themes_controller_spec.rb
+++ b/spec/requests/admin/themes_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'theme_serializer'
diff --git a/spec/requests/admin/user_fields_controller_spec.rb b/spec/requests/admin/user_fields_controller_spec.rb
index f388eeb4194..879ba605104 100644
--- a/spec/requests/admin/user_fields_controller_spec.rb
+++ b/spec/requests/admin/user_fields_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe Admin::UserFieldsController do
diff --git a/spec/requests/admin/users_controller_spec.rb b/spec/requests/admin/users_controller_spec.rb
index 814da26c91f..9ea3689d24c 100644
--- a/spec/requests/admin/users_controller_spec.rb
+++ b/spec/requests/admin/users_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'discourse_ip_info'
diff --git a/spec/requests/admin/versions_controller_spec.rb b/spec/requests/admin/versions_controller_spec.rb
index f8ef30aa506..72cae6cbc4d 100644
--- a/spec/requests/admin/versions_controller_spec.rb
+++ b/spec/requests/admin/versions_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'version'
diff --git a/spec/requests/admin/web_hooks_controller_spec.rb b/spec/requests/admin/web_hooks_controller_spec.rb
index 7a4add76e76..0d5d7d008de 100644
--- a/spec/requests/admin/web_hooks_controller_spec.rb
+++ b/spec/requests/admin/web_hooks_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe Admin::WebHooksController do
diff --git a/spec/requests/application_controller_spec.rb b/spec/requests/application_controller_spec.rb
index 2381b8432f7..b1ca8a06d4b 100644
--- a/spec/requests/application_controller_spec.rb
+++ b/spec/requests/application_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ApplicationController do
@@ -89,7 +91,7 @@ RSpec.describe ApplicationController do
end
it 'should not raise a 500 (nor should it log a warning) for bad params' do
- bad_str = "d\xDE".force_encoding('utf-8')
+ bad_str = (+"d\xDE").force_encoding('utf-8')
expect(bad_str.valid_encoding?).to eq(false)
get "/latest.json", params: { test: bad_str }
diff --git a/spec/requests/badges_controller_spec.rb b/spec/requests/badges_controller_spec.rb
index 2b03b23e38f..bb2f4546ae4 100644
--- a/spec/requests/badges_controller_spec.rb
+++ b/spec/requests/badges_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe BadgesController do
diff --git a/spec/requests/categories_controller_spec.rb b/spec/requests/categories_controller_spec.rb
index 16bdb95f321..4d919c0fcc4 100644
--- a/spec/requests/categories_controller_spec.rb
+++ b/spec/requests/categories_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe CategoriesController do
diff --git a/spec/requests/category_hashtags_controller_spec.rb b/spec/requests/category_hashtags_controller_spec.rb
index c638d82ede0..d31cea66fd0 100644
--- a/spec/requests/category_hashtags_controller_spec.rb
+++ b/spec/requests/category_hashtags_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe CategoryHashtagsController do
diff --git a/spec/requests/clicks_controller_spec.rb b/spec/requests/clicks_controller_spec.rb
index c48ae00b47b..ba21bff9f65 100644
--- a/spec/requests/clicks_controller_spec.rb
+++ b/spec/requests/clicks_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ClicksController do
diff --git a/spec/requests/composer_controller_spec.rb b/spec/requests/composer_controller_spec.rb
index a5bcb668efb..eeec393e43e 100644
--- a/spec/requests/composer_controller_spec.rb
+++ b/spec/requests/composer_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ComposerController do
diff --git a/spec/requests/composer_messages_controller_spec.rb b/spec/requests/composer_messages_controller_spec.rb
index ea3163ccfad..0a148ae862a 100644
--- a/spec/requests/composer_messages_controller_spec.rb
+++ b/spec/requests/composer_messages_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ComposerMessagesController do
diff --git a/spec/requests/csp_reports_controller_spec.rb b/spec/requests/csp_reports_controller_spec.rb
index 51852fea0b3..2c3bfe521da 100644
--- a/spec/requests/csp_reports_controller_spec.rb
+++ b/spec/requests/csp_reports_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe CspReportsController do
diff --git a/spec/requests/directory_items_controller_spec.rb b/spec/requests/directory_items_controller_spec.rb
index 8a188db1071..f1aabe8f29e 100644
--- a/spec/requests/directory_items_controller_spec.rb
+++ b/spec/requests/directory_items_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe DirectoryItemsController do
diff --git a/spec/requests/draft_controller_spec.rb b/spec/requests/draft_controller_spec.rb
index 633f57cbda7..417f792617b 100644
--- a/spec/requests/draft_controller_spec.rb
+++ b/spec/requests/draft_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe DraftController do
diff --git a/spec/requests/drafts_controller_spec.rb b/spec/requests/drafts_controller_spec.rb
index b9ebf3ce1f6..242846d72c8 100644
--- a/spec/requests/drafts_controller_spec.rb
+++ b/spec/requests/drafts_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe DraftsController do
diff --git a/spec/requests/email_controller_spec.rb b/spec/requests/email_controller_spec.rb
index 3af77b39d04..5cb2433262d 100644
--- a/spec/requests/email_controller_spec.rb
+++ b/spec/requests/email_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe EmailController do
diff --git a/spec/requests/embed_controller_spec.rb b/spec/requests/embed_controller_spec.rb
index aadad5b7d8c..1ee75c2b4e4 100644
--- a/spec/requests/embed_controller_spec.rb
+++ b/spec/requests/embed_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe EmbedController do
diff --git a/spec/requests/exceptions_controller_spec.rb b/spec/requests/exceptions_controller_spec.rb
index a19a05a6262..c21fce62199 100644
--- a/spec/requests/exceptions_controller_spec.rb
+++ b/spec/requests/exceptions_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ExceptionsController do
diff --git a/spec/requests/export_csv_controller_spec.rb b/spec/requests/export_csv_controller_spec.rb
index dc0c9e40fc4..a509ba325d4 100644
--- a/spec/requests/export_csv_controller_spec.rb
+++ b/spec/requests/export_csv_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe ExportCsvController do
diff --git a/spec/requests/extra_locales_controller_spec.rb b/spec/requests/extra_locales_controller_spec.rb
index a190489f4f5..a20c49e7428 100644
--- a/spec/requests/extra_locales_controller_spec.rb
+++ b/spec/requests/extra_locales_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ExtraLocalesController do
diff --git a/spec/requests/finish_installation_controller_spec.rb b/spec/requests/finish_installation_controller_spec.rb
index 9801478fc60..6fc4a371bfc 100644
--- a/spec/requests/finish_installation_controller_spec.rb
+++ b/spec/requests/finish_installation_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe FinishInstallationController do
diff --git a/spec/requests/groups_controller_spec.rb b/spec/requests/groups_controller_spec.rb
index 06aed4203a5..46a495d4321 100644
--- a/spec/requests/groups_controller_spec.rb
+++ b/spec/requests/groups_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe GroupsController do
diff --git a/spec/requests/inline_onebox_controller_spec.rb b/spec/requests/inline_onebox_controller_spec.rb
index c46835c82cb..6baf5f3b07d 100644
--- a/spec/requests/inline_onebox_controller_spec.rb
+++ b/spec/requests/inline_onebox_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe InlineOneboxController do
diff --git a/spec/requests/invites_controller_spec.rb b/spec/requests/invites_controller_spec.rb
index 13f0f7c284b..08759327c0d 100644
--- a/spec/requests/invites_controller_spec.rb
+++ b/spec/requests/invites_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe InvitesController do
diff --git a/spec/requests/list_controller_spec.rb b/spec/requests/list_controller_spec.rb
index 21acdd8300a..987116c47ac 100644
--- a/spec/requests/list_controller_spec.rb
+++ b/spec/requests/list_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ListController do
diff --git a/spec/requests/metadata_controller_spec.rb b/spec/requests/metadata_controller_spec.rb
index e5b2f033b87..e387b84bb5d 100644
--- a/spec/requests/metadata_controller_spec.rb
+++ b/spec/requests/metadata_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe MetadataController do
diff --git a/spec/requests/notifications_controller_spec.rb b/spec/requests/notifications_controller_spec.rb
index 19a525dd99f..1777455b817 100644
--- a/spec/requests/notifications_controller_spec.rb
+++ b/spec/requests/notifications_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
def create_notification(user_id, resp_code, matcher)
diff --git a/spec/requests/offline_controller_spec.rb b/spec/requests/offline_controller_spec.rb
index 3bbea353743..62838aaf1aa 100644
--- a/spec/requests/offline_controller_spec.rb
+++ b/spec/requests/offline_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe OfflineController do
diff --git a/spec/requests/omniauth_callbacks_controller_spec.rb b/spec/requests/omniauth_callbacks_controller_spec.rb
index 9a48f5265f9..f6422417e54 100644
--- a/spec/requests/omniauth_callbacks_controller_spec.rb
+++ b/spec/requests/omniauth_callbacks_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Users::OmniauthCallbacksController do
diff --git a/spec/requests/onebox_controller_spec.rb b/spec/requests/onebox_controller_spec.rb
index 21728df3e75..40e95b12fc8 100644
--- a/spec/requests/onebox_controller_spec.rb
+++ b/spec/requests/onebox_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe OneboxController do
diff --git a/spec/requests/permalinks_controller_spec.rb b/spec/requests/permalinks_controller_spec.rb
index b172315c63c..7475e5225ab 100644
--- a/spec/requests/permalinks_controller_spec.rb
+++ b/spec/requests/permalinks_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PermalinksController do
diff --git a/spec/requests/post_action_users_controller_spec.rb b/spec/requests/post_action_users_controller_spec.rb
index 29d525e493b..e794389efe2 100644
--- a/spec/requests/post_action_users_controller_spec.rb
+++ b/spec/requests/post_action_users_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostActionUsersController do
diff --git a/spec/requests/post_actions_controller_spec.rb b/spec/requests/post_actions_controller_spec.rb
index 7c39283e130..8a514dd3de1 100644
--- a/spec/requests/post_actions_controller_spec.rb
+++ b/spec/requests/post_actions_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe PostActionsController do
diff --git a/spec/requests/posts_controller_spec.rb b/spec/requests/posts_controller_spec.rb
index cf96958b499..350d4abaf7a 100644
--- a/spec/requests/posts_controller_spec.rb
+++ b/spec/requests/posts_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
shared_examples 'finding and showing post' do
diff --git a/spec/requests/push_notification_controller_spec.rb b/spec/requests/push_notification_controller_spec.rb
index 42f12e3a073..578bd3ec3df 100644
--- a/spec/requests/push_notification_controller_spec.rb
+++ b/spec/requests/push_notification_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PushNotificationController do
diff --git a/spec/requests/queued_posts_controller_spec.rb b/spec/requests/queued_posts_controller_spec.rb
index 61928f21098..3b613dbfeac 100644
--- a/spec/requests/queued_posts_controller_spec.rb
+++ b/spec/requests/queued_posts_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'queued_posts_controller'
diff --git a/spec/requests/reviewables_controller_spec.rb b/spec/requests/reviewables_controller_spec.rb
index 186c525a8e2..80007867a74 100644
--- a/spec/requests/reviewables_controller_spec.rb
+++ b/spec/requests/reviewables_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ReviewablesController do
diff --git a/spec/requests/robots_txt_controller_spec.rb b/spec/requests/robots_txt_controller_spec.rb
index 34f46e01311..d18d3d4967e 100644
--- a/spec/requests/robots_txt_controller_spec.rb
+++ b/spec/requests/robots_txt_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe RobotsTxtController do
diff --git a/spec/requests/safe_mode_controller_spec.rb b/spec/requests/safe_mode_controller_spec.rb
index 2b6037eb0e9..542e3ed7d81 100644
--- a/spec/requests/safe_mode_controller_spec.rb
+++ b/spec/requests/safe_mode_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe SafeModeController do
diff --git a/spec/requests/search_controller_spec.rb b/spec/requests/search_controller_spec.rb
index b453026a931..c9b069f6ad9 100644
--- a/spec/requests/search_controller_spec.rb
+++ b/spec/requests/search_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SearchController do
diff --git a/spec/requests/session_controller_spec.rb b/spec/requests/session_controller_spec.rb
index 37c2538dda4..db93aa94d02 100644
--- a/spec/requests/session_controller_spec.rb
+++ b/spec/requests/session_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe SessionController do
diff --git a/spec/requests/similar_topics_controller_spec.rb b/spec/requests/similar_topics_controller_spec.rb
index 93e234f22e5..e2ce12bdfcf 100644
--- a/spec/requests/similar_topics_controller_spec.rb
+++ b/spec/requests/similar_topics_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SimilarTopicsController do
diff --git a/spec/requests/site_controller_spec.rb b/spec/requests/site_controller_spec.rb
index 5483ea72f56..01dd9960493 100644
--- a/spec/requests/site_controller_spec.rb
+++ b/spec/requests/site_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SiteController do
diff --git a/spec/requests/static_controller_spec.rb b/spec/requests/static_controller_spec.rb
index 288ee57095e..d234dd9cd2a 100644
--- a/spec/requests/static_controller_spec.rb
+++ b/spec/requests/static_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe StaticController do
diff --git a/spec/requests/steps_controller_spec.rb b/spec/requests/steps_controller_spec.rb
index 6f304bf70a3..56f0db354a6 100644
--- a/spec/requests/steps_controller_spec.rb
+++ b/spec/requests/steps_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe StepsController do
diff --git a/spec/requests/stylesheets_controller_spec.rb b/spec/requests/stylesheets_controller_spec.rb
index 138eb202ab2..38f06152877 100644
--- a/spec/requests/stylesheets_controller_spec.rb
+++ b/spec/requests/stylesheets_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe StylesheetsController do
diff --git a/spec/requests/svg_sprite_controller_spec.rb b/spec/requests/svg_sprite_controller_spec.rb
index cbda1b02f35..5fb1d9c2924 100644
--- a/spec/requests/svg_sprite_controller_spec.rb
+++ b/spec/requests/svg_sprite_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SvgSpriteController do
diff --git a/spec/requests/tag_groups_controller_spec.rb b/spec/requests/tag_groups_controller_spec.rb
index f796644efab..421f2d21b05 100644
--- a/spec/requests/tag_groups_controller_spec.rb
+++ b/spec/requests/tag_groups_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe TagGroupsController do
diff --git a/spec/requests/tags_controller_spec.rb b/spec/requests/tags_controller_spec.rb
index 82c53eaaf2f..b5bc226ce40 100644
--- a/spec/requests/tags_controller_spec.rb
+++ b/spec/requests/tags_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TagsController do
diff --git a/spec/requests/topics_controller_spec.rb b/spec/requests/topics_controller_spec.rb
index 5a22da7b7fe..cc818619827 100644
--- a/spec/requests/topics_controller_spec.rb
+++ b/spec/requests/topics_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe TopicsController do
diff --git a/spec/requests/uploads_controller_spec.rb b/spec/requests/uploads_controller_spec.rb
index 9106ea11ed0..fb6109e62ed 100644
--- a/spec/requests/uploads_controller_spec.rb
+++ b/spec/requests/uploads_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UploadsController do
diff --git a/spec/requests/user_actions_controller_spec.rb b/spec/requests/user_actions_controller_spec.rb
index 351e632db72..1240a969475 100644
--- a/spec/requests/user_actions_controller_spec.rb
+++ b/spec/requests/user_actions_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserActionsController do
diff --git a/spec/requests/user_api_keys_controller_spec.rb b/spec/requests/user_api_keys_controller_spec.rb
index c66e5b6faee..06557d6a358 100644
--- a/spec/requests/user_api_keys_controller_spec.rb
+++ b/spec/requests/user_api_keys_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserApiKeysController do
diff --git a/spec/requests/user_avatars_controller_spec.rb b/spec/requests/user_avatars_controller_spec.rb
index d244ead5045..6ed8d882367 100644
--- a/spec/requests/user_avatars_controller_spec.rb
+++ b/spec/requests/user_avatars_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserAvatarsController do
diff --git a/spec/requests/user_badges_controller_spec.rb b/spec/requests/user_badges_controller_spec.rb
index 3ee79270c16..c4336c8e566 100644
--- a/spec/requests/user_badges_controller_spec.rb
+++ b/spec/requests/user_badges_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserBadgesController do
diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb
index da5b497d3e6..a3f5ad4ad57 100644
--- a/spec/requests/users_controller_spec.rb
+++ b/spec/requests/users_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UsersController do
diff --git a/spec/requests/users_email_controller_spec.rb b/spec/requests/users_email_controller_spec.rb
index b2a6dc1cc73..125643a8c10 100644
--- a/spec/requests/users_email_controller_spec.rb
+++ b/spec/requests/users_email_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UsersEmailController do
diff --git a/spec/requests/webhooks_controller_spec.rb b/spec/requests/webhooks_controller_spec.rb
index 17c51362a1a..269a255a1bb 100644
--- a/spec/requests/webhooks_controller_spec.rb
+++ b/spec/requests/webhooks_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe WebhooksController do
diff --git a/spec/requests/wizard_controller_spec.rb b/spec/requests/wizard_controller_spec.rb
index 9c8c72f6e21..d315a093137 100644
--- a/spec/requests/wizard_controller_spec.rb
+++ b/spec/requests/wizard_controller_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe WizardController do
diff --git a/spec/serializers/admin_plugin_serializer_spec.rb b/spec/serializers/admin_plugin_serializer_spec.rb
index 70d8430a050..7ded3d8c99e 100644
--- a/spec/serializers/admin_plugin_serializer_spec.rb
+++ b/spec/serializers/admin_plugin_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe AdminPluginSerializer do
diff --git a/spec/serializers/admin_user_list_serializer_spec.rb b/spec/serializers/admin_user_list_serializer_spec.rb
index 984a9f9031b..d6c6282e3df 100644
--- a/spec/serializers/admin_user_list_serializer_spec.rb
+++ b/spec/serializers/admin_user_list_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'user'
diff --git a/spec/serializers/basic_group_serializer_spec.rb b/spec/serializers/basic_group_serializer_spec.rb
index 1ba1f276a54..a8a09374fac 100644
--- a/spec/serializers/basic_group_serializer_spec.rb
+++ b/spec/serializers/basic_group_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe BasicGroupSerializer do
diff --git a/spec/serializers/basic_group_user_serializer_spec.rb b/spec/serializers/basic_group_user_serializer_spec.rb
index 065981604e3..c91dfae0df2 100644
--- a/spec/serializers/basic_group_user_serializer_spec.rb
+++ b/spec/serializers/basic_group_user_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe BasicGroupUserSerializer do
diff --git a/spec/serializers/basic_post_serializer_spec.rb b/spec/serializers/basic_post_serializer_spec.rb
index 558204460e7..660bd3b295f 100644
--- a/spec/serializers/basic_post_serializer_spec.rb
+++ b/spec/serializers/basic_post_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'post'
require_dependency 'user'
diff --git a/spec/serializers/basic_user_serializer_spec.rb b/spec/serializers/basic_user_serializer_spec.rb
index 1e0b90832d7..9dfb7877980 100644
--- a/spec/serializers/basic_user_serializer_spec.rb
+++ b/spec/serializers/basic_user_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'user'
diff --git a/spec/serializers/category_detailed_serializer_spec.rb b/spec/serializers/category_detailed_serializer_spec.rb
index e4e3b1bcc8a..48324823b3c 100644
--- a/spec/serializers/category_detailed_serializer_spec.rb
+++ b/spec/serializers/category_detailed_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'category'
diff --git a/spec/serializers/category_serializer_spec.rb b/spec/serializers/category_serializer_spec.rb
index 05d89c1a3f7..c141ceebb6a 100644
--- a/spec/serializers/category_serializer_spec.rb
+++ b/spec/serializers/category_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'category'
diff --git a/spec/serializers/category_upload_serializer_spec.rb b/spec/serializers/category_upload_serializer_spec.rb
index 478ee54b977..884664d6beb 100644
--- a/spec/serializers/category_upload_serializer_spec.rb
+++ b/spec/serializers/category_upload_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe CategoryUploadSerializer do
diff --git a/spec/serializers/current_user_serializer_spec.rb b/spec/serializers/current_user_serializer_spec.rb
index e0b6f7bed6b..4a9afbc7555 100644
--- a/spec/serializers/current_user_serializer_spec.rb
+++ b/spec/serializers/current_user_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe CurrentUserSerializer do
diff --git a/spec/serializers/group_show_serializer_spec.rb b/spec/serializers/group_show_serializer_spec.rb
index 925cf8efb1b..fa86277f2e4 100644
--- a/spec/serializers/group_show_serializer_spec.rb
+++ b/spec/serializers/group_show_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe GroupShowSerializer do
diff --git a/spec/serializers/post_revision_serializer_spec.rb b/spec/serializers/post_revision_serializer_spec.rb
index 9bed7723e00..f0b5330241e 100644
--- a/spec/serializers/post_revision_serializer_spec.rb
+++ b/spec/serializers/post_revision_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostRevisionSerializer do
diff --git a/spec/serializers/post_serializer_spec.rb b/spec/serializers/post_serializer_spec.rb
index 4821390a3e3..f0c76e8e03e 100644
--- a/spec/serializers/post_serializer_spec.rb
+++ b/spec/serializers/post_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'post_action'
diff --git a/spec/serializers/reviewable_flagged_post_serializer_spec.rb b/spec/serializers/reviewable_flagged_post_serializer_spec.rb
index 4f8b68fb28c..63b40b48b43 100644
--- a/spec/serializers/reviewable_flagged_post_serializer_spec.rb
+++ b/spec/serializers/reviewable_flagged_post_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ReviewableFlaggedPostSerializer do
diff --git a/spec/serializers/reviewable_queued_post_serializer_spec.rb b/spec/serializers/reviewable_queued_post_serializer_spec.rb
index 6e18817d881..b8c545cec1c 100644
--- a/spec/serializers/reviewable_queued_post_serializer_spec.rb
+++ b/spec/serializers/reviewable_queued_post_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ReviewableQueuedPostSerializer do
diff --git a/spec/serializers/reviewable_serializer_spec.rb b/spec/serializers/reviewable_serializer_spec.rb
index e2ca4c70186..5906467dfbe 100644
--- a/spec/serializers/reviewable_serializer_spec.rb
+++ b/spec/serializers/reviewable_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ReviewableSerializer do
diff --git a/spec/serializers/reviewable_user_serializer_spec.rb b/spec/serializers/reviewable_user_serializer_spec.rb
index 2fa506494fd..9c9237d60ff 100644
--- a/spec/serializers/reviewable_user_serializer_spec.rb
+++ b/spec/serializers/reviewable_user_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ReviewableUserSerializer do
diff --git a/spec/serializers/single_sign_on_record_serializer_spec.rb b/spec/serializers/single_sign_on_record_serializer_spec.rb
index 6564f343f30..18602a582b5 100644
--- a/spec/serializers/single_sign_on_record_serializer_spec.rb
+++ b/spec/serializers/single_sign_on_record_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe SingleSignOnRecordSerializer do
diff --git a/spec/serializers/site_serializer_spec.rb b/spec/serializers/site_serializer_spec.rb
index ade1cab28d1..c66bac51a58 100644
--- a/spec/serializers/site_serializer_spec.rb
+++ b/spec/serializers/site_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'site'
diff --git a/spec/serializers/suggested_topic_serializer_spec.rb b/spec/serializers/suggested_topic_serializer_spec.rb
index da29757bf96..978c0f32896 100644
--- a/spec/serializers/suggested_topic_serializer_spec.rb
+++ b/spec/serializers/suggested_topic_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SuggestedTopicSerializer do
diff --git a/spec/serializers/tag_group_serializer_spec.rb b/spec/serializers/tag_group_serializer_spec.rb
index eefdcbc9792..b9adf22187d 100644
--- a/spec/serializers/tag_group_serializer_spec.rb
+++ b/spec/serializers/tag_group_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe TagGroupSerializer do
diff --git a/spec/serializers/theme_serializer_spec.rb b/spec/serializers/theme_serializer_spec.rb
index 2e84cae38f8..78fa138f029 100644
--- a/spec/serializers/theme_serializer_spec.rb
+++ b/spec/serializers/theme_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ThemeSerializer do
diff --git a/spec/serializers/topic_link_serializer_spec.rb b/spec/serializers/topic_link_serializer_spec.rb
index 9b61f55ac89..9beabdc83b2 100644
--- a/spec/serializers/topic_link_serializer_spec.rb
+++ b/spec/serializers/topic_link_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicLinkSerializer do
diff --git a/spec/serializers/topic_list_item_serializer_spec.rb b/spec/serializers/topic_list_item_serializer_spec.rb
index 9afb792bc3f..09f51f5c8bc 100644
--- a/spec/serializers/topic_list_item_serializer_spec.rb
+++ b/spec/serializers/topic_list_item_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'post_action'
diff --git a/spec/serializers/topic_list_serializer_spec.rb b/spec/serializers/topic_list_serializer_spec.rb
index 552c5eb3a19..0fc30d4f33d 100644
--- a/spec/serializers/topic_list_serializer_spec.rb
+++ b/spec/serializers/topic_list_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe TopicListSerializer do
diff --git a/spec/serializers/topic_view_posts_serializer_spec.rb b/spec/serializers/topic_view_posts_serializer_spec.rb
index 39a3b30eec2..4002ede9da9 100644
--- a/spec/serializers/topic_view_posts_serializer_spec.rb
+++ b/spec/serializers/topic_view_posts_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe TopicViewPostsSerializer do
diff --git a/spec/serializers/topic_view_serializer_spec.rb b/spec/serializers/topic_view_serializer_spec.rb
index 645750ffb14..436d9cb4c65 100644
--- a/spec/serializers/topic_view_serializer_spec.rb
+++ b/spec/serializers/topic_view_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicViewSerializer do
diff --git a/spec/serializers/upload_serializer_spec.rb b/spec/serializers/upload_serializer_spec.rb
index 8d048c9c107..4bbe3c4fe74 100644
--- a/spec/serializers/upload_serializer_spec.rb
+++ b/spec/serializers/upload_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe UploadSerializer do
diff --git a/spec/serializers/user_auth_token_serializer_spec.rb b/spec/serializers/user_auth_token_serializer_spec.rb
index 93d94f76edb..75f1767d5ca 100644
--- a/spec/serializers/user_auth_token_serializer_spec.rb
+++ b/spec/serializers/user_auth_token_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserAuthTokenSerializer do
diff --git a/spec/serializers/user_serializer_spec.rb b/spec/serializers/user_serializer_spec.rb
index 505294d1187..7a7f3472c5b 100644
--- a/spec/serializers/user_serializer_spec.rb
+++ b/spec/serializers/user_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'user'
diff --git a/spec/serializers/user_summary_serializer_spec.rb b/spec/serializers/user_summary_serializer_spec.rb
index 54354dabdf1..3f821029bc6 100644
--- a/spec/serializers/user_summary_serializer_spec.rb
+++ b/spec/serializers/user_summary_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserSummarySerializer do
diff --git a/spec/serializers/web_hook_post_serializer_spec.rb b/spec/serializers/web_hook_post_serializer_spec.rb
index 2d56df376cd..9777becb61a 100644
--- a/spec/serializers/web_hook_post_serializer_spec.rb
+++ b/spec/serializers/web_hook_post_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe WebHookPostSerializer do
diff --git a/spec/serializers/web_hook_topic_view_serializer_spec.rb b/spec/serializers/web_hook_topic_view_serializer_spec.rb
index ff1ac0cfdbc..d599757d4d6 100644
--- a/spec/serializers/web_hook_topic_view_serializer_spec.rb
+++ b/spec/serializers/web_hook_topic_view_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe WebHookTopicViewSerializer do
diff --git a/spec/serializers/web_hook_user_serializer_spec.rb b/spec/serializers/web_hook_user_serializer_spec.rb
index 65b5c8d876d..6d612b1df0e 100644
--- a/spec/serializers/web_hook_user_serializer_spec.rb
+++ b/spec/serializers/web_hook_user_serializer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe WebHookUserSerializer do
diff --git a/spec/services/anonymous_shadow_creator_spec.rb b/spec/services/anonymous_shadow_creator_spec.rb
index fcd6dfb700e..f390b60c685 100644
--- a/spec/services/anonymous_shadow_creator_spec.rb
+++ b/spec/services/anonymous_shadow_creator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe AnonymousShadowCreator do
diff --git a/spec/services/auto_silence_spec.rb b/spec/services/auto_silence_spec.rb
index aba66ed964d..fa722589a36 100644
--- a/spec/services/auto_silence_spec.rb
+++ b/spec/services/auto_silence_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SpamRule::AutoSilence do
diff --git a/spec/services/badge_granter_spec.rb b/spec/services/badge_granter_spec.rb
index 69486d9825b..e3aad4f1fdb 100644
--- a/spec/services/badge_granter_spec.rb
+++ b/spec/services/badge_granter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe BadgeGranter do
diff --git a/spec/services/color_scheme_revisor_spec.rb b/spec/services/color_scheme_revisor_spec.rb
index d8a23469517..2c7d8590d75 100644
--- a/spec/services/color_scheme_revisor_spec.rb
+++ b/spec/services/color_scheme_revisor_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe ColorSchemeRevisor do
diff --git a/spec/services/destroy_task_spec.rb b/spec/services/destroy_task_spec.rb
index 697dd6b1fae..1114f7a984e 100644
--- a/spec/services/destroy_task_spec.rb
+++ b/spec/services/destroy_task_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe DestroyTask do
diff --git a/spec/services/flag_sockpuppets_spec.rb b/spec/services/flag_sockpuppets_spec.rb
index ea875e4b3ba..0c44b6ea92d 100644
--- a/spec/services/flag_sockpuppets_spec.rb
+++ b/spec/services/flag_sockpuppets_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SpamRule::FlagSockpuppets do
diff --git a/spec/services/group_action_logger_spec.rb b/spec/services/group_action_logger_spec.rb
index 6091596ff7e..5daf9f487e7 100644
--- a/spec/services/group_action_logger_spec.rb
+++ b/spec/services/group_action_logger_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe GroupActionLogger do
diff --git a/spec/services/group_mentions_updater_spec.rb b/spec/services/group_mentions_updater_spec.rb
index eb47170ab10..b591158ab58 100644
--- a/spec/services/group_mentions_updater_spec.rb
+++ b/spec/services/group_mentions_updater_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe GroupMentionsUpdater do
diff --git a/spec/services/group_message_spec.rb b/spec/services/group_message_spec.rb
index 94957e0bc9c..b999e711d69 100644
--- a/spec/services/group_message_spec.rb
+++ b/spec/services/group_message_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe GroupMessage do
diff --git a/spec/services/i18n_interpolation_keys_finder_spec.rb b/spec/services/i18n_interpolation_keys_finder_spec.rb
index 74407676526..46901b463dd 100644
--- a/spec/services/i18n_interpolation_keys_finder_spec.rb
+++ b/spec/services/i18n_interpolation_keys_finder_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require "i18n/i18n_interpolation_keys_finder"
diff --git a/spec/services/notification_emailer_spec.rb b/spec/services/notification_emailer_spec.rb
index 746dfb0c0d3..1c34978072e 100644
--- a/spec/services/notification_emailer_spec.rb
+++ b/spec/services/notification_emailer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe NotificationEmailer do
diff --git a/spec/services/post_action_notifier_spec.rb b/spec/services/post_action_notifier_spec.rb
index d2d049e0ccf..89a1229e5d5 100644
--- a/spec/services/post_action_notifier_spec.rb
+++ b/spec/services/post_action_notifier_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe PostActionNotifier do
diff --git a/spec/services/post_alerter_spec.rb b/spec/services/post_alerter_spec.rb
index b137ad44e45..e8724ace37e 100644
--- a/spec/services/post_alerter_spec.rb
+++ b/spec/services/post_alerter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec::Matchers.define :add_notification do |user, notification_type|
diff --git a/spec/services/post_owner_changer_spec.rb b/spec/services/post_owner_changer_spec.rb
index d6930518878..2c8b124a1c7 100644
--- a/spec/services/post_owner_changer_spec.rb
+++ b/spec/services/post_owner_changer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe PostOwnerChanger do
diff --git a/spec/services/push_notification_pusher_spec.rb b/spec/services/push_notification_pusher_spec.rb
index 5bfb947f6ad..30bb918980a 100644
--- a/spec/services/push_notification_pusher_spec.rb
+++ b/spec/services/push_notification_pusher_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe PushNotificationPusher do
diff --git a/spec/services/random_topic_selector_spec.rb b/spec/services/random_topic_selector_spec.rb
index 8b0dbbccf49..c601523aebd 100644
--- a/spec/services/random_topic_selector_spec.rb
+++ b/spec/services/random_topic_selector_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe RandomTopicSelector do
diff --git a/spec/services/search_indexer_spec.rb b/spec/services/search_indexer_spec.rb
index 1639168f8af..b9be8c2fb3b 100644
--- a/spec/services/search_indexer_spec.rb
+++ b/spec/services/search_indexer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SearchIndexer do
diff --git a/spec/services/site_settings_spec.rb b/spec/services/site_settings_spec.rb
index 0fb1dbff16b..c76c017f363 100644
--- a/spec/services/site_settings_spec.rb
+++ b/spec/services/site_settings_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe SiteSettingsTask do
diff --git a/spec/services/staff_action_logger_spec.rb b/spec/services/staff_action_logger_spec.rb
index 40c5106645a..68c5d52a8a8 100644
--- a/spec/services/staff_action_logger_spec.rb
+++ b/spec/services/staff_action_logger_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe StaffActionLogger do
diff --git a/spec/services/topic_status_updater_spec.rb b/spec/services/topic_status_updater_spec.rb
index 70ce71a74d4..338fe122cf2 100644
--- a/spec/services/topic_status_updater_spec.rb
+++ b/spec/services/topic_status_updater_spec.rb
@@ -1,4 +1,5 @@
# encoding: UTF-8
+# frozen_string_literal: true
require 'rails_helper'
require_dependency 'post_destroyer'
diff --git a/spec/services/topic_timestamp_changer_spec.rb b/spec/services/topic_timestamp_changer_spec.rb
index 2c61a45c84b..cc86e221228 100644
--- a/spec/services/topic_timestamp_changer_spec.rb
+++ b/spec/services/topic_timestamp_changer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TopicTimestampChanger do
diff --git a/spec/services/trust_level_granter_spec.rb b/spec/services/trust_level_granter_spec.rb
index b85222c7bea..0d6bfa7ffd7 100644
--- a/spec/services/trust_level_granter_spec.rb
+++ b/spec/services/trust_level_granter_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe TrustLevelGranter do
diff --git a/spec/services/user_activator_spec.rb b/spec/services/user_activator_spec.rb
index e584189ffd8..9678fb57030 100644
--- a/spec/services/user_activator_spec.rb
+++ b/spec/services/user_activator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserActivator do
diff --git a/spec/services/user_anonymizer_spec.rb b/spec/services/user_anonymizer_spec.rb
index 29a02bde382..3855647ffe1 100644
--- a/spec/services/user_anonymizer_spec.rb
+++ b/spec/services/user_anonymizer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe UserAnonymizer do
diff --git a/spec/services/user_authenticator_spec.rb b/spec/services/user_authenticator_spec.rb
index 1c8f05d04d4..3e3bcd9f0c3 100644
--- a/spec/services/user_authenticator_spec.rb
+++ b/spec/services/user_authenticator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'user_authenticator'
diff --git a/spec/services/user_destroyer_spec.rb b/spec/services/user_destroyer_spec.rb
index eca824be093..ef55d81d2a8 100644
--- a/spec/services/user_destroyer_spec.rb
+++ b/spec/services/user_destroyer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require_dependency 'user_destroyer'
diff --git a/spec/services/user_merger_spec.rb b/spec/services/user_merger_spec.rb
index 7243191b00c..2e6576f8c5f 100644
--- a/spec/services/user_merger_spec.rb
+++ b/spec/services/user_merger_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserMerger do
diff --git a/spec/services/user_silencer_spec.rb b/spec/services/user_silencer_spec.rb
index a0c40b34594..2350443079f 100644
--- a/spec/services/user_silencer_spec.rb
+++ b/spec/services/user_silencer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserSilencer do
diff --git a/spec/services/user_updater_spec.rb b/spec/services/user_updater_spec.rb
index f7db5982d75..a0ca6ab2ad5 100644
--- a/spec/services/user_updater_spec.rb
+++ b/spec/services/user_updater_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UserUpdater do
diff --git a/spec/services/username_changer_spec.rb b/spec/services/username_changer_spec.rb
index ef3ce2f9cb1..7f4346c992d 100644
--- a/spec/services/username_changer_spec.rb
+++ b/spec/services/username_changer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UsernameChanger do
diff --git a/spec/services/username_checker_service_spec.rb b/spec/services/username_checker_service_spec.rb
index 32e91e3026c..68d3331c008 100644
--- a/spec/services/username_checker_service_spec.rb
+++ b/spec/services/username_checker_service_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe UsernameCheckerService do
diff --git a/spec/services/wildcard_domain_checker_spec.rb b/spec/services/wildcard_domain_checker_spec.rb
index 806ca99246c..e7d5ccb65b3 100644
--- a/spec/services/wildcard_domain_checker_spec.rb
+++ b/spec/services/wildcard_domain_checker_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe WildcardDomainChecker do
diff --git a/spec/services/word_watcher_spec.rb b/spec/services/word_watcher_spec.rb
index e84468993ad..1df8b20ee31 100644
--- a/spec/services/word_watcher_spec.rb
+++ b/spec/services/word_watcher_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
describe WordWatcher do
diff --git a/spec/support/diagnostics_helper.rb b/spec/support/diagnostics_helper.rb
index 8756a9ddbb3..6c335d317a8 100644
--- a/spec/support/diagnostics_helper.rb
+++ b/spec/support/diagnostics_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module MessageBus::DiagnosticsHelper
def publish(channel, data, opts = nil)
id = super(channel, data, opts)
diff --git a/spec/support/discourse_event_helper.rb b/spec/support/discourse_event_helper.rb
index 6ad49077361..222a8124053 100644
--- a/spec/support/discourse_event_helper.rb
+++ b/spec/support/discourse_event_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module DiscourseEvent::TestHelper
def trigger(event_name, *params)
super(event_name, *params)
diff --git a/spec/support/fake_logger.rb b/spec/support/fake_logger.rb
index ea89f06fa8b..dcad4126761 100644
--- a/spec/support/fake_logger.rb
+++ b/spec/support/fake_logger.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class FakeLogger
attr_reader :warnings, :errors, :infos, :fatals
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 11db6097697..cb6a496f3ea 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Helpers
extend ActiveSupport::Concern
diff --git a/spec/support/integration_helpers.rb b/spec/support/integration_helpers.rb
index f2d72771c65..381fedf2d56 100644
--- a/spec/support/integration_helpers.rb
+++ b/spec/support/integration_helpers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module IntegrationHelpers
def create_user
get "/u/hp.json"
diff --git a/spec/support/match_html_matcher.rb b/spec/support/match_html_matcher.rb
index d40c3cea654..c6b6b771026 100644
--- a/spec/support/match_html_matcher.rb
+++ b/spec/support/match_html_matcher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'nokogiri/xml/parse_options'
RSpec::Matchers.define :match_html do |expected|
match do |actual|
diff --git a/spec/support/rate_limit_matcher.rb b/spec/support/rate_limit_matcher.rb
index e189c83bcac..ebc3ffde239 100644
--- a/spec/support/rate_limit_matcher.rb
+++ b/spec/support/rate_limit_matcher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec::Matchers.define :rate_limit do |attribute|
match do |model|
model.class.include? RateLimiter::OnCreateRecord
diff --git a/spec/support/shared_examples_for_stats_cacheable.rb b/spec/support/shared_examples_for_stats_cacheable.rb
index 0b4306f41b7..430adb13495 100644
--- a/spec/support/shared_examples_for_stats_cacheable.rb
+++ b/spec/support/shared_examples_for_stats_cacheable.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples_for 'stats cachable' do
describe 'fetch_cached_stats' do
after do
diff --git a/spec/support/site_settings_helpers.rb b/spec/support/site_settings_helpers.rb
index 5e196f8bf22..52fbe512c45 100644
--- a/spec/support/site_settings_helpers.rb
+++ b/spec/support/site_settings_helpers.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module SiteSettingsHelpers
def new_settings(provider)
Class.new do
diff --git a/spec/support/time_matcher.rb b/spec/support/time_matcher.rb
index 02a6fd859bc..ec7930e35a6 100644
--- a/spec/support/time_matcher.rb
+++ b/spec/support/time_matcher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec::Matchers.define :be_within_one_second_of do |expected_time|
match do |actual_time|
(actual_time - expected_time).abs < 1
diff --git a/spec/support/versioning/shared_examples_for_versioned_model.rb b/spec/support/versioning/shared_examples_for_versioned_model.rb
index 51864ce64fd..1a01fb67f0a 100644
--- a/spec/support/versioning/shared_examples_for_versioned_model.rb
+++ b/spec/support/versioning/shared_examples_for_versioned_model.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
shared_examples_for "a versioned model" do
let(:model) { Fabricate(described_class.to_s.downcase) }
diff --git a/spec/tasks/posts_spec.rb b/spec/tasks/posts_spec.rb
index a0cbe9338cd..d410313b588 100644
--- a/spec/tasks/posts_spec.rb
+++ b/spec/tasks/posts_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
require 'highline/import'
require 'highline/simulate'
diff --git a/spec/tasks/redis_spec.rb b/spec/tasks/redis_spec.rb
index 64e0305e2f9..a949ba7cda5 100644
--- a/spec/tasks/redis_spec.rb
+++ b/spec/tasks/redis_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe "Redis rake tasks" do
diff --git a/spec/views/omniauth_callbacks/complete.html.erb_spec.rb b/spec/views/omniauth_callbacks/complete.html.erb_spec.rb
index 4b45e3a5fab..028213e521d 100644
--- a/spec/views/omniauth_callbacks/complete.html.erb_spec.rb
+++ b/spec/views/omniauth_callbacks/complete.html.erb_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
require "auth/authenticator"
diff --git a/spec/views/omniauth_callbacks/failure.html.erb_spec.rb b/spec/views/omniauth_callbacks/failure.html.erb_spec.rb
index b4c16c984cf..a96dc160745 100644
--- a/spec/views/omniauth_callbacks/failure.html.erb_spec.rb
+++ b/spec/views/omniauth_callbacks/failure.html.erb_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "rails_helper"
describe "users/omniauth_callbacks/failure.html.erb" do