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