Add some frozen string to spec/**/*.rb

Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
This commit is contained in:
gfyoung 2019-04-15 10:17:05 +00:00 committed by Rémy Coutable
parent d5e3677e0c
commit 93a44e135b
154 changed files with 313 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
title: Add some frozen string to spec/**/*.rb
merge_request:
author: gfyoung
type: other

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
load File.expand_path('../../bin/changelog', __dir__)

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe 'mail_room.yml' do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('config', 'object_store_settings.rb')

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Settings do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe AbuseReportsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::ApplicationSettingsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::ApplicationsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::DashboardController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::GitalyServersController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::GroupsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::HealthCheckController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::HooksController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::IdentitiesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::ImpersonationsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::ProjectsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::RunnersController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::ServicesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::SpamLogsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Admin::UsersController do

View File

@ -1,4 +1,5 @@
# coding: utf-8
# frozen_string_literal: true
require 'spec_helper'
describe ApplicationController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe AutocompleteController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Boards::IssuesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Boards::ListsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe ChecksCollaboration do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe ContinueParams do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe ControllerWithCrossProjectAccessCheck do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe GroupTree do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe InternalRedirect do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe IssuableCollections do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe LfsRequest do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe ProjectUnauthorized do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe SendFileUpload do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Dashboard::GroupsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Dashboard::LabelsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Dashboard::MilestonesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Dashboard::ProjectsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Dashboard::TodosController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe DashboardController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Explore::GroupsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Explore::ProjectsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe GoogleApi::AuthorizationsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::AvatarsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::BoardsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::ChildrenController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::GroupMembersController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::LabelsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::MilestonesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::RunnersController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::Settings::CiCdController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::SharedProjectsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::UploadsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Groups::VariablesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe GroupsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe HealthCheckController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe HealthController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe HelpController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Import::BitbucketController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Import::BitbucketServerController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Import::FogbugzController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Import::GiteaController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Import::GithubController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Import::GitlabController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Import::GitlabProjectsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Import::GoogleCodeController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe InvitesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Ldap::OmniauthCallbacksController do
@ -43,7 +45,7 @@ describe Ldap::OmniauthCallbacksController do
end
context 'sign up' do
let(:user) { double(email: 'new@example.com') }
let(:user) { double(email: +'new@example.com') }
before do
stub_omniauth_setting(block_auto_created_users: false)

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe MetricsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe NotificationSettingsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Oauth::ApplicationsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Oauth::AuthorizationsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe OmniauthCallbacksController, type: :controller do
@ -7,7 +9,7 @@ describe OmniauthCallbacksController, type: :controller do
let(:user) { create(:omniauth_user, extern_uid: extern_uid, provider: provider) }
before do
mock_auth_hash(provider.to_s, extern_uid, user.email)
mock_auth_hash(provider.to_s, +extern_uid, user.email)
stub_omniauth_provider(provider, context: request)
end
@ -141,7 +143,7 @@ describe OmniauthCallbacksController, type: :controller do
end
shared_context 'sign_up' do
let(:user) { double(email: 'new@example.com') }
let(:user) { double(email: +'new@example.com') }
before do
stub_omniauth_setting(block_auto_created_users: false)
@ -220,7 +222,7 @@ describe OmniauthCallbacksController, type: :controller do
before do
stub_omniauth_saml_config({ enabled: true, auto_link_saml_user: true, allow_single_sign_on: ['saml'],
providers: [saml_config] })
mock_auth_hash_with_saml_xml('saml', 'my-uid', user.email, mock_saml_response)
mock_auth_hash_with_saml_xml('saml', +'my-uid', user.email, mock_saml_response)
request.env["devise.mapping"] = Devise.mappings[:user]
request.env['omniauth.auth'] = Rails.application.env_config['omniauth.auth']
post :saml, params: { SAMLResponse: mock_saml_response }

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe PasswordsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Profiles::AccountsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Profiles::AvatarsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Profiles::EmailsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Profiles::KeysController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Profiles::NotificationsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Profiles::PersonalAccessTokensController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Profiles::PreferencesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Profiles::TwoFactorAuthsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require('spec_helper')
describe ProfilesController, :request_store do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::ArtifactsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::AvatarsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::BadgesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::BlameController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'rails_helper'
describe Projects::BlobController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::BoardsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::BranchesController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::Ci::LintsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::CommitController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::CommitsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::CompareController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::CycleAnalyticsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::DeployKeysController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::DeploymentsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::DiscussionsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::EnvironmentsController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::FindFileController do

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe Projects::ForksController do

Some files were not shown because too many files have changed in this diff Show More