Commit 0a180d2d authored by Dmytro Zaporozhets's avatar Dmytro Zaporozhets

Merge branch '220018-rspec-zero-monkey-patching-mode-5' into 'master'

RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!33726
parents 43c12413 e5c0be0a
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::LogCursor::Events::RepositoryRenamedEvent, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::Geo::LogCursor::Events::RepositoryRenamedEvent, :clean_gitlab_redis_shared_state do
let(:logger) { Gitlab::Geo::LogCursor::Logger.new(described_class, Logger::INFO) }
let(:event_log) { create(:geo_event_log, :renamed_event) }
let!(:event_log_state) { create(:geo_event_log_state, event_id: event_log.id - 1) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::LogCursor::Events::RepositoryUpdatedEvent, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::Geo::LogCursor::Events::RepositoryUpdatedEvent, :clean_gitlab_redis_shared_state do
include ::EE::GeoHelpers
let(:logger) { Gitlab::Geo::LogCursor::Logger.new(described_class, Logger::INFO) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::LogCursor::Events::ResetChecksumEvent, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::Geo::LogCursor::Events::ResetChecksumEvent, :clean_gitlab_redis_shared_state do
let(:logger) { Gitlab::Geo::LogCursor::Logger.new(described_class, Logger::INFO) }
let(:event_log) { create(:geo_event_log, :reset_checksum_event) }
let!(:event_log_state) { create(:geo_event_log_state, event_id: event_log.id - 1) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::LogCursor::Events::UploadDeletedEvent, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::Geo::LogCursor::Events::UploadDeletedEvent, :clean_gitlab_redis_shared_state do
let(:logger) { Gitlab::Geo::LogCursor::Logger.new(described_class, Logger::INFO) }
let(:project) { create(:project) }
let(:upload_deleted_event) { create(:geo_upload_deleted_event, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::LogCursor::Lease, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::Geo::LogCursor::Lease, :clean_gitlab_redis_shared_state do
include ExclusiveLeaseHelpers
describe '.exclusive_lease' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::LogCursor::Logger, :geo do
RSpec.describe Gitlab::Geo::LogCursor::Logger, :geo do
subject(:logger) { described_class.new(LoggerSpec) }
let(:data) { { pid: 111, class: 'LoggerSpec', host: 'localhost', message: 'Test' } }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::LogHelpers do
RSpec.describe Gitlab::Geo::LogHelpers do
before do
stub_const('FakeLogHelpersConsumer', Class.new)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Logger do
RSpec.describe Gitlab::Geo::Logger do
it 'uses the same log_level defined in Rails' do
allow(Rails.logger).to receive(:level) { 99 }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Oauth::LoginState do
RSpec.describe Gitlab::Geo::Oauth::LoginState do
let(:salt) { 'b9653b6aa2ff6b54' }
let(:token) { 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InJldHVybl90byI6Ii9wcm9qZWN0L3Rlc3Q_Zm9vPWJhciN6b28ifSwianRpIjoiODdjZDQ2M2MtOTgyNC00ZjliLWI5NDMtOGFkMjJmY2E2MmZhIiwiaWF0IjoxNTQ5ODI1MjAwLCJuYmYiOjE1NDk4MjUxOTUsImV4cCI6MTU0OTgyNTI2MH0.qZE6kuoeW6BK1URuIl8l8MiCfGjtTTXixVdMCE80gVA' }
let(:return_to) { 'http://fake-secondary.com:3000/project/test?foo=bar#zoo' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Oauth::LogoutState do
RSpec.describe Gitlab::Geo::Oauth::LogoutState do
let(:salt) { 'MTAwZDhjYmQxNzUw' }
let(:tag) { 'Y0D_b1xDW3uO-qN86c83HQ==' }
let(:return_to) { 'http://fake-secondary.com:3000/project/test' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Oauth::LogoutToken do
RSpec.describe Gitlab::Geo::Oauth::LogoutToken do
let(:user) { create(:user) }
let(:node) { create(:geo_node) }
let(:access_token) { create(:doorkeeper_access_token, resource_owner_id: user.id, application_id: node.oauth_application_id) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Oauth::Session, :geo do
RSpec.describe Gitlab::Geo::Oauth::Session, :geo do
include EE::GeoHelpers
# This spec doesn't work with a relative_url_root https://gitlab.com/gitlab-org/gitlab/issues/11261
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::BaseTransfer do
RSpec.describe Gitlab::Geo::Replication::BaseTransfer do
include ::EE::GeoHelpers
let_it_be(:primary_node) { create(:geo_node, :primary) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::BlobDownloader do
RSpec.describe Gitlab::Geo::Replication::BlobDownloader do
include ::EE::GeoHelpers
let_it_be(:primary) { create(:geo_node, :primary) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Geo::Replication::BlobRetriever, :aggregate_failures do
RSpec.describe Gitlab::Geo::Replication::BlobRetriever, :aggregate_failures do
let(:package_file) { create(:package_file, :npm) }
let(:package_checksum) { package_file.class.hexdigest(package_file.file.path) }
let(:replicator_class) { Geo::PackageFileReplicator }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::FileDownloader, :geo do
RSpec.describe Gitlab::Geo::Replication::FileDownloader, :geo do
include EE::GeoHelpers
let_it_be(:primary_node) { create(:geo_node, :primary) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::FileRetriever, :geo do
RSpec.describe Gitlab::Geo::Replication::FileRetriever, :geo do
shared_examples_for 'returns necessary params for sending a file from an API endpoint' do
subject { @subject ||= retriever.execute }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::FileTransfer do
RSpec.describe Gitlab::Geo::Replication::FileTransfer do
include ::EE::GeoHelpers
let_it_be(:primary_node) { create(:geo_node, :primary) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::JobArtifactDownloader, :geo do
RSpec.describe Gitlab::Geo::Replication::JobArtifactDownloader, :geo do
let(:job_artifact) { create(:ci_job_artifact) }
describe '#execute' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::JobArtifactRetriever, :geo do
RSpec.describe Gitlab::Geo::Replication::JobArtifactRetriever, :geo do
describe '#execute' do
let(:retriever) { described_class.new(job_artifact.id, {}) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::JobArtifactTransfer, :geo do
RSpec.describe Gitlab::Geo::Replication::JobArtifactTransfer, :geo do
include ::EE::GeoHelpers
let_it_be(:primary_node) { create(:geo_node, :primary) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::LfsDownloader, :geo do
RSpec.describe Gitlab::Geo::Replication::LfsDownloader, :geo do
let(:lfs_object) { create(:lfs_object) }
describe '#execute' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::LfsRetriever, :geo do
RSpec.describe Gitlab::Geo::Replication::LfsRetriever, :geo do
describe '#execute' do
subject { retriever.execute }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replication::LfsTransfer do
RSpec.describe Gitlab::Geo::Replication::LfsTransfer do
include ::EE::GeoHelpers
let_it_be(:primary_node) { create(:geo_node, :primary) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::Replicator do
RSpec.describe Gitlab::Geo::Replicator do
include ::EE::GeoHelpers
let_it_be(:primary_node) { create(:geo_node, :primary) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo, :geo, :request_store do
RSpec.describe Gitlab::Geo, :geo, :request_store do
using RSpec::Parameterized::TableSyntax
include ::EE::GeoHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::GitAccess do
RSpec.describe Gitlab::GitAccess do
include GitHelpers
include EE::GeoHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::GitAccessWiki do
RSpec.describe Gitlab::GitAccessWiki do
let(:user) { create(:user) }
let(:project) { create(:project, :wiki_repo) }
let(:changes) { ['6f6d7e7ed 570e7b2ab refs/heads/master'] }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::GlRepository::Identifier do
RSpec.describe Gitlab::GlRepository::Identifier do
let_it_be(:group) { create(:group) }
# GitLab Starter feature
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::GlRepository::RepoType do
RSpec.describe Gitlab::GlRepository::RepoType do
describe Gitlab::GlRepository::WIKI do
context 'group wiki' do
let_it_be(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Gitlab::GlRepository do
RSpec.describe ::Gitlab::GlRepository do
describe '.parse' do
let_it_be(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Graphql::Aggregations::Epics::EpicNode do
RSpec.describe Gitlab::Graphql::Aggregations::Epics::EpicNode do
include_context 'includes EpicAggregate constants'
let(:epic_id) { 34 }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Graphql::Aggregations::Epics::LazyEpicAggregate do
RSpec.describe Gitlab::Graphql::Aggregations::Epics::LazyEpicAggregate do
include_context 'includes EpicAggregate constants'
let(:query_ctx) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Graphql::Loaders::BatchEpicIssuesLoader do
RSpec.describe Gitlab::Graphql::Loaders::BatchEpicIssuesLoader do
describe '#find' do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Graphql::Loaders::BulkEpicAggregateLoader do
RSpec.describe Gitlab::Graphql::Loaders::BulkEpicAggregateLoader do
include_context 'includes EpicAggregate constants'
let_it_be(:group) { create(:group, :public) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::GroupPlansPreloader do
RSpec.describe Gitlab::GroupPlansPreloader do
describe '#preload' do
let!(:plan1) { create(:free_plan, name: 'plan-1') }
let!(:plan2) { create(:free_plan, name: 'plan-2') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ImportExport::Group::RelationFactory do
RSpec.describe Gitlab::ImportExport::Group::RelationFactory do
let(:group) { create(:group) }
let(:members_mapper) { double('members_mapper').as_null_object }
let(:user) { create(:admin) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ImportExport::Project::ObjectBuilder do
RSpec.describe Gitlab::ImportExport::Project::ObjectBuilder do
let!(:group) { create(:group, :private) }
let!(:subgroup) { create(:group, :private, parent: group) }
let!(:project) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ImportSources do
RSpec.describe Gitlab::ImportSources do
describe '.import_table' do
it 'includes specific EE imports types when the license supports them' do
stub_licensed_features(custom_project_templates: true)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Insights::ProjectInsightsConfig do
RSpec.describe Gitlab::Insights::ProjectInsightsConfig do
let_it_be(:project) { create(:project) }
let(:chart1) { { title: 'chart 1', description: 'description 1' } }
let(:chart2) { { title: 'chart 2', description: 'description 2' } }
......
......@@ -5,7 +5,7 @@ require 'spec_helper'
# We don't want to interact with Elasticsearch in GitLab FOSS so we test
# this in ee/ only. The code exists in FOSS and won't do anything.
describe ::Gitlab::Instrumentation::ElasticsearchTransport, :elastic, :request_store do
RSpec.describe ::Gitlab::Instrumentation::ElasticsearchTransport, :elastic, :request_store do
describe '.increment_request_count' do
it 'increases the request count by 1' do
expect { described_class.increment_request_count }.to change(described_class, :get_request_count).by(1)
......@@ -45,7 +45,7 @@ describe ::Gitlab::Instrumentation::ElasticsearchTransport, :elastic, :request_s
end
end
describe ::Gitlab::Instrumentation::ElasticsearchTransportInterceptor, :elastic, :request_store do
RSpec.describe ::Gitlab::Instrumentation::ElasticsearchTransportInterceptor, :elastic, :request_store do
before do
allow(::Gitlab::PerformanceBar).to receive(:enabled_for_request?).and_return(true)
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::InstrumentationHelper do
RSpec.describe Gitlab::InstrumentationHelper do
describe '.add_instrumentation_data', :request_store do
let(:payload) { {} }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::IpAddressState do
RSpec.describe Gitlab::IpAddressState do
let(:address) { '1.1.1.1' }
describe '.with' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ItemsCollection do
RSpec.describe Gitlab::ItemsCollection do
let(:collection) { described_class.new(items) }
let(:items) { Array.new(42, :dependency) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Jira::Dvcs do
RSpec.describe Gitlab::Jira::Dvcs do
describe '.encode_slash' do
it 'replaces slash character' do
expect(described_class.encode_slash('a/b/c')).to eq('a@b@c')
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Jira::Middleware do
RSpec.describe Gitlab::Jira::Middleware do
let(:app) { double(:app) }
let(:middleware) { described_class.new(app) }
let(:jira_user_agent) { 'Jira DVCS Connector Vertigo/5.0.0-D20170810T012915' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Kerberos::Authentication do
RSpec.describe Gitlab::Kerberos::Authentication do
let(:user) { create(:omniauth_user, provider: :kerberos, extern_uid: 'gitlab@FOO.COM') }
let(:login) { 'john' }
let(:password) { 'password' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Kubernetes::Deployment do
RSpec.describe Gitlab::Kubernetes::Deployment do
include KubernetesHelpers
let(:pods) { {} }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Kubernetes::RolloutStatus do
RSpec.describe Gitlab::Kubernetes::RolloutStatus do
include KubernetesHelpers
let(:track) { nil }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::LegacyGithubImport::ProjectCreator do
RSpec.describe Gitlab::LegacyGithubImport::ProjectCreator do
let(:user) { create(:user) }
let(:namespace) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Metrics::Samplers::GlobalSearchSampler do
RSpec.describe Gitlab::Metrics::Samplers::GlobalSearchSampler do
subject { described_class.new }
describe '#interval' do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Middleware::IpRestrictor do
RSpec.describe Gitlab::Middleware::IpRestrictor do
let(:app) { double(:app) }
let(:middleware) { described_class.new(app) }
let(:env) { {} }
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
require 'tempfile'
describe Gitlab::Middleware::Multipart do
RSpec.describe Gitlab::Middleware::Multipart do
include_context 'multipart middleware context'
describe '#call' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Mirror do
RSpec.describe Gitlab::Mirror do
before do
Sidekiq::Logging.logger = nil
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ObjectHierarchy do
RSpec.describe Gitlab::ObjectHierarchy do
let!(:parent) { create(:group) }
let!(:child1) { create(:group, parent: parent) }
let!(:child2) { create(:group, parent: child1) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::PaginationDelegate do
RSpec.describe Gitlab::PaginationDelegate do
context 'no data' do
let(:delegate) do
described_class.new(page: 1,
......
......@@ -2,7 +2,7 @@
require 'fast_spec_helper'
describe Gitlab::Patch::DrawRoute do
RSpec.describe Gitlab::Patch::DrawRoute do
subject do
Class.new do
include Gitlab::Patch::DrawRoute
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::PathLocksFinder do
RSpec.describe Gitlab::PathLocksFinder do
let_it_be(:project) { create :project }
let_it_be(:user) { create :user }
let_it_be(:lock1) { create(:path_lock, project: project, path: 'app') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ProjectTemplate do
RSpec.describe Gitlab::ProjectTemplate do
describe '.all' do
context 'when `enterprise_templates` feature is not licensed' do
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Prometheus::Queries::AdditionalMetricsDeploymentQuery do
RSpec.describe Gitlab::Prometheus::Queries::AdditionalMetricsDeploymentQuery do
around do |example|
Timecop.freeze(Time.local(2008, 9, 1, 12, 0, 0)) { example.run }
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Prometheus::Queries::AdditionalMetricsEnvironmentQuery do
RSpec.describe Gitlab::Prometheus::Queries::AdditionalMetricsEnvironmentQuery do
around do |example|
Timecop.freeze { example.run }
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Prometheus::Queries::ClusterQuery do
RSpec.describe Gitlab::Prometheus::Queries::ClusterQuery do
let(:client) { double('prometheus_client', query_range: nil) }
subject { described_class.new(client) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Prometheus::Queries::PacketFlowMetricsQuery do
RSpec.describe Gitlab::Prometheus::Queries::PacketFlowMetricsQuery do
let(:namespace) { 'query-12345678-production' }
let(:query_response) do
[
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Prometheus::Queries::PacketFlowQuery do
RSpec.describe Gitlab::Prometheus::Queries::PacketFlowQuery do
let(:namespace) { 'query-12345678-production' }
let(:query_range_response) { [] }
let(:query_response) { [] }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Proxy do
RSpec.describe Gitlab::Proxy do
describe '.detect_proxy' do
subject { described_class.detect_proxy }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ReferenceExtractor do
RSpec.describe Gitlab::ReferenceExtractor do
let(:group) { create(:group) }
let(:project) { create(:project, group: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Regex do
RSpec.describe Gitlab::Regex do
describe '.conan_file_name_regex' do
subject { described_class.conan_file_name_regex }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ReturnToLocation do
RSpec.describe Gitlab::ReturnToLocation do
describe '#full_path' do
it 'returns nil when location nil' do
subject = described_class.new(nil)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ServiceDeskEmail do
RSpec.describe Gitlab::ServiceDeskEmail do
describe '.enabled?' do
context 'when service_desk_email is enabled and address is set' do
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SidekiqConfig do
RSpec.describe Gitlab::SidekiqConfig do
describe '.workers' do
it 'includes EE workers' do
worker_classes = described_class.workers.map(&:klass)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::IssueShow do
RSpec.describe Gitlab::SlashCommands::Presenters::IssueShow do
let(:project) { create(:project) }
let(:attachment) { subject[:attachments].first }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SPDX::CatalogueGateway do
RSpec.describe Gitlab::SPDX::CatalogueGateway do
include StubRequests
describe "#fetch" do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::SubscriptionPortal::Client do
RSpec.describe Gitlab::SubscriptionPortal::Client do
let(:http_response) { nil }
let(:httparty_response) do
double(code: http_response.code, response: http_response, body: {}, parsed_response: {})
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe "Custom file template classes" do
RSpec.describe "Custom file template classes" do
files = {
'Dockerfile/foo.dockerfile' => 'CustomDockerfileTemplate Foo',
'Dockerfile/bar.dockerfile' => 'CustomDockerfileTemplate Bar',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::TreeSummary do
RSpec.describe Gitlab::TreeSummary do
let_it_be(:project) { create(:project, :custom_repo, files: { 'a.txt' => '' }) }
let_it_be(:path_lock) { create(:path_lock, project: project, path: 'a.txt') }
let_it_be(:user) { create(:user) }
......
......@@ -2,6 +2,6 @@
require 'spec_helper'
describe Gitlab::UsageCounters::DependencyList, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::UsageCounters::DependencyList, :clean_gitlab_redis_shared_state do
it_behaves_like 'a usage counter'
end
......@@ -2,6 +2,6 @@
require 'spec_helper'
describe Gitlab::UsageCounters::PodLogs, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::UsageCounters::PodLogs, :clean_gitlab_redis_shared_state do
it_behaves_like 'a usage counter'
end
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::UsageDataCounters::LicensesList do
RSpec.describe Gitlab::UsageDataCounters::LicensesList do
it_behaves_like 'a redis usage counter', 'LicensesList', :views
it_behaves_like 'a redis usage counter with totals', :licenses_list, views: 7
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::UsageDataCounters::NetworkPolicyCounter, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::UsageDataCounters::NetworkPolicyCounter, :clean_gitlab_redis_shared_state do
describe '.add' do
it 'increases drops and forwards counters' do
described_class.add(10, 5)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::UserAccess do
RSpec.describe Gitlab::UserAccess do
include ExternalAuthorizationServiceHelpers
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::VisibilityLevel do
RSpec.describe Gitlab::VisibilityLevel do
describe '.levels_for_user' do
it 'returns all levels for an auditor' do
user = build(:user, :auditor)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Vulnerabilities::BaseVulnerability do
RSpec.describe Gitlab::Vulnerabilities::BaseVulnerability do
let(:vulnerability) do
described_class.new(
title: 'title',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Vulnerabilities::ContainerScanningVulnerability do
RSpec.describe Gitlab::Vulnerabilities::ContainerScanningVulnerability do
let(:data) do
{
featurename: 'foo',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Vulnerabilities::HistoryCache do
RSpec.describe Gitlab::Vulnerabilities::HistoryCache do
describe '#fetch', :use_clean_rails_memory_store_caching do
shared_examples 'the history cache when given an expected Vulnerable' do
let(:project) { create(:project, :public, namespace: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Vulnerabilities::History do
RSpec.describe Gitlab::Vulnerabilities::History do
describe '#findings_counter', :use_clean_rails_memory_store_caching do
shared_examples 'the history cache when given an expected Vulnerable' do
let(:filters) { ActionController::Parameters.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Vulnerabilities::Parser do
RSpec.describe Gitlab::Vulnerabilities::Parser do
describe '.fabricate' do
let(:params) do
{
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Vulnerabilities::StandardVulnerability do
RSpec.describe Gitlab::Vulnerabilities::StandardVulnerability do
let(:title) { 'Predictable pseudorandom number generator' }
let(:name) { 'Predictable pseudorandom number generator (from name)' }
let(:description) { 'Description of Predictable pseudorandom number generator' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Vulnerabilities::SummaryCache do
RSpec.describe Gitlab::Vulnerabilities::SummaryCache do
let(:group) { create(:group) }
let(:project) { create(:project, :public, namespace: group) }
let(:project_cache_key) { described_class.new(group, project.id).send(:cache_key) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Vulnerabilities::Summary do
RSpec.describe Gitlab::Vulnerabilities::Summary do
let(:group) { create(:group) }
let(:project1) { create(:project, :public, namespace: group) }
let(:project2) { create(:project, :public, namespace: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe OmniAuth::Strategies::GroupSaml, type: :strategy do
RSpec.describe OmniAuth::Strategies::GroupSaml, type: :strategy do
include Gitlab::Routing
let(:strategy) { [OmniAuth::Strategies::GroupSaml, {}] }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe OmniAuth::Strategies::KerberosSpnego do
RSpec.describe OmniAuth::Strategies::KerberosSpnego do
subject { described_class.new(:app) }
let(:session) { {} }
......
......@@ -5,7 +5,7 @@ require 'spec_helper'
# We don't want to interact with Elasticsearch in GitLab FOSS so we test
# this in ee/ only. The code exists in FOSS and won't do anything.
describe Peek::Views::Elasticsearch, :elastic, :request_store do
RSpec.describe Peek::Views::Elasticsearch, :elastic, :request_store do
before do
allow(::Gitlab::PerformanceBar).to receive(:enabled_for_request?).and_return(true)
ensure_elasticsearch_index!
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Pseudonymizer::Dumper do
RSpec.describe Pseudonymizer::Dumper do
let!(:project) { create(:project) }
let(:base_dir) { Dir.mktmpdir }
let(:options) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Pseudonymizer::Pager do
RSpec.describe Pseudonymizer::Pager do
let(:page_size) { 1 }
let!(:projects) { create_list(:project, 10) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Pseudonymizer::Uploader do
RSpec.describe Pseudonymizer::Uploader do
let(:base_dir) { Dir.mktmpdir }
let(:options) do
Pseudonymizer::Options.new(
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::Filter::ImageFilter do
RSpec.describe StatusPage::Filter::ImageFilter do
include FilterSpecHelper
describe '.call' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::Filter::MentionAnonymizationFilter do
RSpec.describe StatusPage::Filter::MentionAnonymizationFilter do
include FilterSpecHelper
it 'replaces user link with anonymized text' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::Pipeline::PostProcessPipeline do
RSpec.describe StatusPage::Pipeline::PostProcessPipeline do
describe '.filters' do
let(:expected_filters) do
[StatusPage::Filter::MentionAnonymizationFilter] +
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::Storage::S3Client, :aws_s3 do
RSpec.describe StatusPage::Storage::S3Client, :aws_s3 do
let(:region) { 'eu-west-1' }
let(:bucket_name) { 'bucket_name' }
let(:access_key_id) { 'key_id' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::Storage::S3MultipartUpload, :aws_s3 do
RSpec.describe StatusPage::Storage::S3MultipartUpload, :aws_s3 do
let(:region) { 'eu-west-1' }
let(:bucket_name) { 'bucket_name' }
let(:access_key_id) { 'key_id' }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment