Commit e5c0be0a authored by Arturo Herrero's avatar Arturo Herrero

RSpec zero monkey patching mode

The plan for RSpec 4.0 is to disable monkey patching:
https://rspec.info/blog/2013/07/the-plan-for-rspec-3/#zero-monkey-patching-mode

This commit stops using RSpec monkey patching:
https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode
parent 9ed204a2
......@@ -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) }
context 'group wiki' do
......
......@@ -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' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::Storage do
RSpec.describe StatusPage::Storage do
describe '.details_path' do
subject { described_class.details_path(123) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage do
RSpec.describe StatusPage do
let(:project) { instance_double(Project) }
let(:user) { instance_double(User) }
let(:triggered_by) { instance_double(Issue) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SystemCheck::App::ElasticsearchCheck do
RSpec.describe SystemCheck::App::ElasticsearchCheck do
describe '#skip?' do
context 'with elasticsearch disabled' do
before do
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'rake_helper'
describe SystemCheck::Geo::AuthorizedKeysCheck do
RSpec.describe SystemCheck::Geo::AuthorizedKeysCheck do
describe '#multi_check' do
subject { described_class.new }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'rake_helper'
describe SystemCheck::Geo::AuthorizedKeysFlagCheck do
RSpec.describe SystemCheck::Geo::AuthorizedKeysFlagCheck do
before do
silence_output
end
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'rake_helper'
describe SystemCheck::Geo::CurrentNodeCheck, :geo do
RSpec.describe SystemCheck::Geo::CurrentNodeCheck, :geo do
describe '#check?' do
context 'when the current machine has a matching GeoNode' do
it 'returns true' do
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'rake_helper'
describe SystemCheck::Geo::FdwEnabledCheck, :geo do
RSpec.describe SystemCheck::Geo::FdwEnabledCheck, :geo do
describe '#skip?' do
subject { described_class.new.skip? }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'rake_helper'
describe SystemCheck::Geo::FdwSchemaUpToDateCheck, :geo do
RSpec.describe SystemCheck::Geo::FdwSchemaUpToDateCheck, :geo do
describe '#skip?' do
it 'skips when Geo is disabled' do
allow(Gitlab::Geo).to receive(:enabled?) { false }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'rake_helper'
describe SystemCheck::Geo::GeoDatabaseConfiguredCheck do
RSpec.describe SystemCheck::Geo::GeoDatabaseConfiguredCheck do
before do
silence_output
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SystemCheck::Geo::HTTPCloneEnabledCheck do
RSpec.describe SystemCheck::Geo::HTTPCloneEnabledCheck do
describe '#check?' do
subject { described_class.new.check? }
......
# frozen_string_literal: true
require 'spec_helper'
describe SystemCheck::Geo::HttpConnectionCheck do
RSpec.describe SystemCheck::Geo::HttpConnectionCheck do
include EE::GeoHelpers
let_it_be(:primary_node) { create(:geo_node, :primary) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SystemCheck::RakeTask::GeoTask do
RSpec.describe SystemCheck::RakeTask::GeoTask do
include ::EE::GeoHelpers
let(:common_checks) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe World do
RSpec.describe World do
describe '.all_countries' do
it 'does not return countries that are in the denied list' do
result = described_class.all_countries
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191108202723_add_unique_constraint_to_software_licenses.rb')
describe AddUniqueConstraintToSoftwareLicenses do
RSpec.describe AddUniqueConstraintToSoftwareLicenses do
let(:migration) { described_class.new }
let(:projects) { table(:projects) }
let(:licenses) { table(:software_licenses) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200117194850_backfill_operations_feature_flags_iid.rb')
describe BackfillOperationsFeatureFlagsIid do
RSpec.describe BackfillOperationsFeatureFlagsIid do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:flags) { table(:operations_feature_flags) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190917173107_backfill_software_licenses_spdx_identifiers.rb')
describe BackfillSoftwareLicensesSpdxIdentifiers do
RSpec.describe BackfillSoftwareLicensesSpdxIdentifiers do
let(:software_licenses) { table(:software_licenses) }
describe '#up' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191030223057_backfill_version_author_and_created_at.rb')
describe BackfillVersionAuthorAndCreatedAt do
RSpec.describe BackfillVersionAuthorAndCreatedAt do
let_it_be(:migration_name) { described_class::MIGRATION.to_s.demodulize }
let_it_be(:projects) { table(:projects) }
let_it_be(:issues) { table(:issues) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191125024005_cleanup_deploy_access_levels_for_removed_groups.rb')
describe CleanupDeployAccessLevelsForRemovedGroups do
RSpec.describe CleanupDeployAccessLevelsForRemovedGroups do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:groups) { table(:namespaces) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191008143850_fix_any_approver_rule_for_projects.rb')
describe FixAnyApproverRuleForProjects do
RSpec.describe FixAnyApproverRuleForProjects do
let(:namespaces) { table(:namespaces) }
let(:namespace) { namespaces.create(name: 'gitlab', path: 'gitlab-org') }
let(:projects) { table(:projects) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('ee', 'db', 'geo', 'migrate', '20180322062741_migrate_ci_job_artifacts_to_separate_registry.rb')
describe MigrateCiJobArtifactsToSeparateRegistry, :geo do
RSpec.describe MigrateCiJobArtifactsToSeparateRegistry, :geo do
let(:file_registry) { table(:file_registry) }
let(:job_artifact_registry) { table(:job_artifact_registry) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('ee', 'db', 'geo', 'migrate', '20191010204941_migrate_lfs_objects_to_separate_registry.rb')
describe MigrateLfsObjectsToSeparateRegistry, :geo do
RSpec.describe MigrateLfsObjectsToSeparateRegistry, :geo do
let(:file_registry) { table(:file_registry) }
let(:lfs_object_registry) { table(:lfs_object_registry) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('ee', 'db', 'geo', 'migrate', '20180510223634_set_resync_flag_for_retried_projects.rb')
describe SetResyncFlagForRetriedProjects, :geo do
RSpec.describe SetResyncFlagForRetriedProjects, :geo do
let(:registry) { table(:project_registry) }
before do
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200124110831_migrate_design_notes_mentions_to_db')
describe MigrateDesignNotesMentionsToDb, :sidekiq do
RSpec.describe MigrateDesignNotesMentionsToDb, :sidekiq do
let(:users) { table(:users) }
let(:projects) { table(:projects) }
let(:namespaces) { table(:namespaces) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191115115043_migrate_epic_mentions_to_db')
describe MigrateEpicMentionsToDb, :migration do
RSpec.describe MigrateEpicMentionsToDb, :migration do
let(:users) { table(:users) }
let(:namespaces) { table(:namespaces) }
let(:epics) { table(:epics) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191115115522_migrate_epic_notes_mentions_to_db')
describe MigrateEpicNotesMentionsToDb, :migration do
RSpec.describe MigrateEpicNotesMentionsToDb, :migration do
let(:users) { table(:users) }
let(:namespaces) { table(:namespaces) }
let(:epics) { table(:epics) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200310215714_migrate_saml_identities_to_scim_identities.rb')
describe MigrateSamlIdentitiesToScimIdentities, :migration do
RSpec.describe MigrateSamlIdentitiesToScimIdentities, :migration do
let(:group1) { table(:namespaces).create!(name: 'group1', path: 'group1') }
let(:group2) { table(:namespaces).create!(name: 'group2', path: 'group2') }
let(:saml_provider1) { table(:saml_providers).create!(enabled: true, group_id: group1.id, certificate_fingerprint: '123abc', sso_url: 'https://sso1.example.com') }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200506154421_migrate_scim_identities_to_saml_for_new_users.rb')
describe MigrateScimIdentitiesToSamlForNewUsers, :migration do
RSpec.describe MigrateScimIdentitiesToSamlForNewUsers, :migration do
let(:group1) { table(:namespaces).create!(name: 'group1', path: 'group1') }
let(:group2) { table(:namespaces).create!(name: 'group2', path: 'group2') }
let(:saml_provider1) { table(:saml_providers).create!(enabled: true, group_id: group1.id, certificate_fingerprint: '123abc', sso_url: 'https://sso1.example.com') }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200416111111_migrate_vulnerability_dismissals.rb')
describe MigrateVulnerabilityDismissals, :migration, :sidekiq do
RSpec.describe MigrateVulnerabilityDismissals, :migration, :sidekiq do
let(:users) { table(:users) }
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191022113635_nullify_feature_flag_plaintext_tokens.rb')
describe NullifyFeatureFlagPlaintextTokens do
RSpec.describe NullifyFeatureFlagPlaintextTokens do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:feature_flags_clients) { table(:operations_feature_flags_clients) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200113151354_remove_creations_in_gitlab_subscription_histories.rb')
describe RemoveCreationsInGitlabSubscriptionHistories do
RSpec.describe RemoveCreationsInGitlabSubscriptionHistories do
before do
stub_const('GITLAB_SUBSCRIPTION_CREATED', 0)
stub_const('GITLAB_SUBSCRIPTION_UPDATED', 1)
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200207185149_schedule_fix_orphan_promoted_issues.rb')
describe ScheduleFixOrphanPromotedIssues do
RSpec.describe ScheduleFixOrphanPromotedIssues do
let(:projects) { table(:projects) }
let(:notes) { table(:notes) }
let(:project1) { projects.create!(namespace_id: 99) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190905091831_schedule_merge_request_any_approval_rule_migration.rb')
describe ScheduleMergeRequestAnyApprovalRuleMigration do
RSpec.describe ScheduleMergeRequestAnyApprovalRuleMigration do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:namespace) { namespaces.create(name: 'gitlab', path: 'gitlab-org') }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190905091812_schedule_project_any_approval_rule_migration.rb')
describe ScheduleProjectAnyApprovalRuleMigration do
RSpec.describe ScheduleProjectAnyApprovalRuleMigration do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:namespace) { namespaces.create(name: 'gitlab', path: 'gitlab-org') }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191105094625_set_report_type_for_vulnerabilities.rb')
describe SetReportTypeForVulnerabilities do
RSpec.describe SetReportTypeForVulnerabilities do
let(:confidence_levels) do
{ undefined: 0, ignore: 1, unknown: 2, experimental: 3, low: 4, medium: 5, high: 6, confirmed: 7 }
end
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191114173624_set_resolved_state_on_vulnerabilities.rb')
describe SetResolvedStateOnVulnerabilities do
RSpec.describe SetResolvedStateOnVulnerabilities do
let(:confidence_levels) do
{ undefined: 0, ignore: 1, unknown: 2, experimental: 3, low: 4, medium: 5, high: 6, confirmed: 7 }
end
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190909141517_update_cs_vulnerability_confidence_column.rb')
describe UpdateCsVulnerabilityConfidenceColumn do
RSpec.describe UpdateCsVulnerabilityConfidenceColumn do
let(:vulnerabilities) { table(:vulnerability_occurrences) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:scanners) { table(:vulnerability_scanners) }
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200227140242_update_occurrence_severity_column.rb')
describe UpdateOccurrenceSeverityColumn do
RSpec.describe UpdateOccurrenceSeverityColumn do
let(:vulnerabilities) { table(:vulnerability_occurrences) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:scanners) { table(:vulnerability_scanners) }
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200506085748_update_undefined_confidence_from_occurrences.rb')
describe UpdateUndefinedConfidenceFromOccurrences, :migration do
RSpec.describe UpdateUndefinedConfidenceFromOccurrences, :migration do
let(:vulnerabilities) { table(:vulnerability_occurrences) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:scanners) { table(:vulnerability_scanners) }
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200511092714_update_undefined_confidence_from_vulnerabilities.rb')
describe UpdateUndefinedConfidenceFromVulnerabilities, :migration do
RSpec.describe UpdateUndefinedConfidenceFromVulnerabilities, :migration do
let(:vulnerabilities) { table(:vulnerabilities) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:projects) { table(:projects) }
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200302142052_update_vulnerability_severity_column.rb')
describe UpdateVulnerabilitySeverityColumn, :migration do
RSpec.describe UpdateVulnerabilitySeverityColumn, :migration do
let(:vulnerabilities) { table(:vulnerabilities) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:projects) { table(:projects) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe AllowedEmailDomain do
RSpec.describe AllowedEmailDomain do
describe 'relations' do
it { is_expected.to belong_to(:group) }
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Analytics::CycleAnalytics::GroupLevel do
RSpec.describe Analytics::CycleAnalytics::GroupLevel do
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, :repository, namespace: group) }
let_it_be(:from_date) { 10.days.ago }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Analytics::CycleAnalytics::GroupStage do
RSpec.describe Analytics::CycleAnalytics::GroupStage do
describe 'associations' do
it { is_expected.to belong_to(:group) }
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Analytics::CycleAnalytics::ProjectStage do
RSpec.describe Analytics::CycleAnalytics::ProjectStage do
include_examples 'cycle analytics label based stage' do
let_it_be(:group) { create(:group) }
let_it_be(:parent) { create(:project, group: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Analytics::LanguageTrend::RepositoryLanguage do
RSpec.describe Analytics::LanguageTrend::RepositoryLanguage do
describe 'associations' do
it { is_expected.to belong_to(:programming_language) }
it { is_expected.to belong_to(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ApplicationSetting do
RSpec.describe ApplicationSetting do
using RSpec::Parameterized::TableSyntax
subject(:setting) { described_class.create_from_defaults }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Approvable do
RSpec.describe Approvable do
subject(:merge_request) { create(:merge_request) }
let(:project) { merge_request.project }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ApprovalMergeRequestRule do
RSpec.describe ApprovalMergeRequestRule do
let(:merge_request) { create(:merge_request) }
subject { create(:approval_merge_request_rule, merge_request: merge_request) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ApprovalProjectRule do
RSpec.describe ApprovalProjectRule do
subject { create(:approval_project_rule) }
describe 'validations' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Approval do
RSpec.describe Approval do
subject { create(:approval) }
it { is_expected.to be_valid }
......
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