Commit 9daed804 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

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

RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!33732
parents a05ddd82 b742c6cb
......@@ -15,7 +15,7 @@ require 'spec_helper'
# Subgroup 2_1
# Group 2
describe Projects::CreateFromTemplateService do
RSpec.describe Projects::CreateFromTemplateService do
using RSpec::Parameterized::TableSyntax
let(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::CreateService, '#execute' do
RSpec.describe Projects::CreateService, '#execute' do
include EE::GeoHelpers
let(:user) { create :user }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::DestroyService do
RSpec.describe Projects::DestroyService do
include EE::GeoHelpers
let!(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::GitlabProjectsImportService do
RSpec.describe Projects::GitlabProjectsImportService do
let_it_be(:namespace) { create(:namespace) }
let(:path) { 'test-path' }
let(:custom_template) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::GroupLinks::CreateService, '#execute' do
RSpec.describe Projects::GroupLinks::CreateService, '#execute' do
include ProjectForksHelper
let(:user) { create :user }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::GroupLinks::DestroyService do
RSpec.describe Projects::GroupLinks::DestroyService do
let!(:user) { create(:user) }
let!(:group) { create(:group) }
let!(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::HashedStorage::MigrateAttachmentsService do
RSpec.describe Projects::HashedStorage::MigrateAttachmentsService do
include EE::GeoHelpers
let(:project) { create(:project, storage_version: 1) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::HashedStorage::MigrateRepositoryService do
RSpec.describe Projects::HashedStorage::MigrateRepositoryService do
include EE::GeoHelpers
let(:gitlab_shell) { Gitlab::Shell.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::ImportExport::ExportService do
RSpec.describe Projects::ImportExport::ExportService do
describe '#execute' do
context 'project templates' do
let_it_be(:group) { create(:group, :private) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::ImportService do
RSpec.describe Projects::ImportService do
let_it_be(:project) { create(:project) }
let_it_be(:user) { project.creator }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::Licenses::CreatePolicyService do
RSpec.describe Projects::Licenses::CreatePolicyService do
subject { described_class.new(project, user, params) }
let_it_be(:project) { create(:project, :repository, :private) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::Licenses::UpdatePolicyService do
RSpec.describe Projects::Licenses::UpdatePolicyService do
subject { described_class.new(project, user, params) }
let(:project) { create(:project, :repository, :private) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::MarkForDeletionService do
RSpec.describe Projects::MarkForDeletionService do
let(:user) { create(:user) }
let(:marked_for_deletion_at) { nil }
let(:project) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::Operations::UpdateService do
RSpec.describe Projects::Operations::UpdateService do
let_it_be(:user) { create(:user) }
let(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::Prometheus::Alerts::NotifyService do
RSpec.describe Projects::Prometheus::Alerts::NotifyService do
let_it_be(:project, reload: true) { create(:project) }
let(:service) { described_class.new(project, nil, payload) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::RestoreService do
RSpec.describe Projects::RestoreService do
let(:user) { create(:user) }
let(:pending_delete) { nil }
let(:project) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::SetupCiCd do
RSpec.describe Projects::SetupCiCd do
let(:user) { create(:user) }
let(:project) { create(:project, creator: user, import_url: 'http://foo.com') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::SlackApplicationInstallService do
RSpec.describe Projects::SlackApplicationInstallService do
let!(:user) { create(:user) }
let!(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::TransferService do
RSpec.describe Projects::TransferService do
include EE::GeoHelpers
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::UpdateMirrorService do
RSpec.describe Projects::UpdateMirrorService do
let(:project) do
create(:project, :repository, :mirror, import_url: Project::UNKNOWN_IMPORT_URL, only_mirror_protected_branches: false)
end
......
......@@ -2,7 +2,7 @@
require "spec_helper"
describe Projects::UpdatePagesService do
RSpec.describe Projects::UpdatePagesService do
let(:root_namespace) { create(:namespace, max_pages_size: 300) }
let(:namespace) { create(:namespace, parent: root_namespace, max_pages_size: 200) }
let(:project) { create(:project, :repository, namespace: namespace, max_pages_size: 250) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::UpdateService, '#execute' do
RSpec.describe Projects::UpdateService, '#execute' do
include EE::GeoHelpers
let(:user) { create(:user) }
......
# frozen_string_literal: true
require 'spec_helper'
describe ProtectedEnvironments::CreateService, '#execute' do
RSpec.describe ProtectedEnvironments::CreateService, '#execute' do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:maintainer_access) { Gitlab::Access::MAINTAINER }
......
# frozen_string_literal: true
require 'spec_helper'
describe ProtectedEnvironments::DestroyService, '#execute' do
RSpec.describe ProtectedEnvironments::DestroyService, '#execute' do
let(:project) { create(:project) }
let(:user) { create(:user) }
let!(:protected_environment) { create(:protected_environment, project: project) }
......
# frozen_string_literal: true
require 'spec_helper'
describe ProtectedEnvironments::EnvironmentDropdownService, '#roles' do
RSpec.describe ProtectedEnvironments::EnvironmentDropdownService, '#roles' do
let(:roles) do
[
{ id: 40, text: 'Maintainers', before_divider: true },
......
# frozen_string_literal: true
require 'spec_helper'
describe ProtectedEnvironments::SearchService, '#execute' do
RSpec.describe ProtectedEnvironments::SearchService, '#execute' do
let(:project) { create(:project) }
let(:user) { create(:user) }
......
# frozen_string_literal: true
require 'spec_helper'
describe ProtectedEnvironments::UpdateService, '#execute' do
RSpec.describe ProtectedEnvironments::UpdateService, '#execute' do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:maintainer_access) { Gitlab::Access::MAINTAINER }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe QuickActions::InterpretService do
RSpec.describe QuickActions::InterpretService do
let(:current_user) { create(:user) }
let(:user) { create(:user) }
let(:user2) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RequirementsManagement::CreateRequirementService do
RSpec.describe RequirementsManagement::CreateRequirementService do
let_it_be(:project) { create(:project)}
let_it_be(:user) { create(:user) }
let_it_be(:other_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RequirementsManagement::UpdateRequirementService do
RSpec.describe RequirementsManagement::UpdateRequirementService do
let_it_be(:project) { create(:project)}
let_it_be(:user) { create(:user) }
let_it_be(:requirement) { create(:requirement, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Search::GlobalService do
RSpec.describe Search::GlobalService do
include SearchResultHelpers
include ProjectHelpers
using RSpec::Parameterized::TableSyntax
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Search::GroupService, :elastic do
RSpec.describe Search::GroupService, :elastic do
include SearchResultHelpers
include ProjectHelpers
using RSpec::Parameterized::TableSyntax
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Search::ProjectService do
RSpec.describe Search::ProjectService do
include SearchResultHelpers
include ProjectHelpers
using RSpec::Parameterized::TableSyntax
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Search::SnippetService do
RSpec.describe Search::SnippetService do
include SearchResultHelpers
include ProjectHelpers
using RSpec::Parameterized::TableSyntax
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SearchService do
RSpec.describe SearchService do
describe '#search_objects' do
context 'redacting search results (repository)', :elastic, :sidekiq_inline do
let(:project) { create(:project, :repository) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::DependencyListService do
RSpec.describe Security::DependencyListService do
describe '#execute' do
let!(:pipeline) { create(:ee_ci_pipeline, :with_dependency_list_report) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::MergeReportsService, '#execute' do
RSpec.describe Security::MergeReportsService, '#execute' do
let(:scanner_1) { build(:ci_reports_security_scanner, external_id: 'scanner-1', name: 'Scanner 1') }
let(:scanner_2) { build(:ci_reports_security_scanner, external_id: 'scanner-2', name: 'Scanner 2') }
let(:scanner_3) { build(:ci_reports_security_scanner, external_id: 'scanner-3', name: 'Scanner 3') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::ReportFetchService do
RSpec.describe Security::ReportFetchService do
let_it_be(:project) { create(:project) }
let(:service) { described_class.new(project, artifact) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::StoreReportService, '#execute' do
RSpec.describe Security::StoreReportService, '#execute' do
let(:user) { create(:user) }
let(:artifact) { create(:ee_ci_job_artifact, report_type) }
let(:project) { artifact.project }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::StoreReportsService do
RSpec.describe Security::StoreReportsService do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:project) { create(:project, :public, namespace: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::StoreScansService do
RSpec.describe Security::StoreScansService do
let(:build) { create(:ci_build) }
subject { Security::StoreScansService.new(build).execute }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::SyncReportsToApprovalRulesService, '#execute' do
RSpec.describe Security::SyncReportsToApprovalRulesService, '#execute' do
let(:merge_request) { create(:merge_request) }
let(:project) { merge_request.project }
let(:pipeline) { create(:ee_ci_pipeline, :success, project: project, merge_requests_as_head_pipeline: [merge_request]) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::WafAnomalySummaryService do
RSpec.describe Security::WafAnomalySummaryService do
let(:environment) { create(:environment, :with_review_app, environment_type: 'review') }
let!(:cluster) do
create(:cluster, :provided_by_gcp, environment_scope: '*', projects: [environment.project])
......
# frozen_string_literal: true
require 'spec_helper'
describe ServiceDeskSettings::UpdateService do
RSpec.describe ServiceDeskSettings::UpdateService do
describe '#execute' do
let_it_be(:settings) { create(:service_desk_setting, outgoing_name: 'original name') }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SlashCommands::GlobalSlackHandler do
RSpec.describe SlashCommands::GlobalSlackHandler do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:chat_name) { double(:chat_name, user: user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SoftwareLicensePolicies::CreateService do
RSpec.describe SoftwareLicensePolicies::CreateService do
let(:project) { create(:project) }
let(:params) { { name: 'ExamplePL/2.1', approval_status: 'blacklisted' } }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SoftwareLicensePolicies::UpdateService do
RSpec.describe SoftwareLicensePolicies::UpdateService do
let(:project) { create(:project)}
let(:user) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StartPullMirroringService do
RSpec.describe StartPullMirroringService do
let(:project) { create(:project) }
let(:import_state) { create(:import_state, project: project) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::MarkForPublicationService do
RSpec.describe StatusPage::MarkForPublicationService do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) }
let_it_be(:project, refind: true) { create(:project, group: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::PublishAttachmentsService do
RSpec.describe StatusPage::PublishAttachmentsService do
RSpec.shared_context 'second file' do
# Setup second file
let(:upload_secret_2) { '9cb61a79ce884d5b681dd42728d3c159' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::PublishDetailsService do
RSpec.describe StatusPage::PublishDetailsService do
include ::StatusPage::PublicationServiceResponses
let_it_be(:project, refind: true) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::PublishListService do
RSpec.describe StatusPage::PublishListService do
let_it_be(:project, refind: true) { create(:project) }
let(:issues) { [instance_double(Issue)] }
let(:key) { StatusPage::Storage.list_path }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::PublishService do
RSpec.describe StatusPage::PublishService do
let_it_be(:user) { create(:user) }
let_it_be(:project, refind: true) { create(:project) }
let_it_be(:issue) { create(:issue, :published, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::TriggerPublishService do
RSpec.describe StatusPage::TriggerPublishService do
let_it_be(:user) { create(:user) }
let_it_be(:project, refind: true) { create(:project, :repository) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::UnpublishDetailsService do
RSpec.describe StatusPage::UnpublishDetailsService do
let_it_be(:project, refind: true) { create(:project) }
let(:issue) { instance_double(Issue, iid: incident_id) }
let(:incident_id) { 1 }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Subscriptions::CreateService do
RSpec.describe Subscriptions::CreateService do
subject { described_class.new(user, group: group, customer_params: customer_params, subscription_params: subscription_params) }
let_it_be(:user) { create(:user, id: 111, first_name: 'First name', last_name: 'Last name', email: 'first.last@gitlab.com') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SystemNoteService do
RSpec.describe SystemNoteService do
include ProjectForksHelper
include Gitlab::Routing
include RepoHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe TodoService do
RSpec.describe TodoService do
let(:author) { create(:user, username: 'author') }
let(:non_member) { create(:user, username: 'non_member') }
let(:member) { create(:user, username: 'member') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe UpdateBuildMinutesService do
RSpec.describe UpdateBuildMinutesService do
describe '#perform' do
let(:namespace) { create(:namespace, shared_runners_minutes_limit: 100) }
let(:project) { create(:project, :public, namespace: namespace) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe UsersOpsDashboardProjects::DestroyService do
RSpec.describe UsersOpsDashboardProjects::DestroyService do
let(:user) { create(:user) }
let(:service) { described_class.new(user) }
let(:project) { create(:project, :private) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::ConfirmService do
RSpec.describe Vulnerabilities::ConfirmService do
include AccessMatchersGeneric
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::CreateService do
RSpec.describe Vulnerabilities::CreateService do
before do
stub_licensed_features(security_dashboard: true)
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::DismissService do
RSpec.describe Vulnerabilities::DismissService do
include AccessMatchersGeneric
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::ResolveService do
RSpec.describe Vulnerabilities::ResolveService do
include AccessMatchersGeneric
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Vulnerabilities::UserNotesCountService, :use_clean_rails_memory_store_caching do
RSpec.describe Vulnerabilities::UserNotesCountService, :use_clean_rails_memory_store_caching do
let_it_be(:vulnerability) { create(:vulnerability) }
subject { described_class.new(vulnerability) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityExports::CreateService do
RSpec.describe VulnerabilityExports::CreateService do
include AccessMatchersGeneric
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityExports::ExportService do
RSpec.describe VulnerabilityExports::ExportService do
describe '::export' do
let(:vulnerability_export) { create(:vulnerability_export) }
let(:mock_service_object) { instance_double(described_class, export: true) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityExports::Exporters::CsvService do
RSpec.describe VulnerabilityExports::Exporters::CsvService do
let(:export_csv_service) { described_class.new(Vulnerability.all) }
subject(:csv) { CSV.parse(export_csv_service.generate, headers: true) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityFeedback::CreateService, '#execute' do
RSpec.describe VulnerabilityFeedback::CreateService, '#execute' do
let(:group) { create(:group) }
let(:project) { create(:project, :public, :repository, namespace: group) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityFeedback::DestroyService, '#execute' do
RSpec.describe VulnerabilityFeedback::DestroyService, '#execute' do
let(:group) { create(:group) }
let(:project) { create(:project, :public, :repository, namespace: group) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityIssueLinks::CreateService do
RSpec.describe VulnerabilityIssueLinks::CreateService do
include AccessMatchersGeneric
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityIssueLinks::DeleteService do
RSpec.describe VulnerabilityIssueLinks::DeleteService do
include AccessMatchersGeneric
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe WikiPages::CreateService do
RSpec.describe WikiPages::CreateService do
let(:user) { create(:user) }
let(:opts) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe WikiPages::DestroyService do
RSpec.describe WikiPages::DestroyService do
let(:user) { create(:user) }
let(:page) { create(:wiki_page) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe WikiPages::UpdateService do
RSpec.describe WikiPages::UpdateService do
let(:user) { create(:user) }
let(:page) { create(:wiki_page) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Wikis::CreateAttachmentService do
RSpec.describe Wikis::CreateAttachmentService do
it_behaves_like 'Wikis::CreateAttachmentService#execute', :group
end
# frozen_string_literal: true
shared_context 'includes EpicAggregate constants' do
RSpec.shared_context 'includes EpicAggregate constants' do
before do
stub_const('EPIC_TYPE', Gitlab::Graphql::Aggregations::Epics::Constants::EPIC_TYPE)
stub_const('ISSUE_TYPE', Gitlab::Graphql::Aggregations::Epics::Constants::ISSUE_TYPE)
......
# frozen_string_literal: true
shared_context 'gitlab team member' do
RSpec.shared_context 'gitlab team member' do
let_it_be(:namespace) { create(:group, name: 'gitlab-com') }
before do
......
# frozen_string_literal: true
shared_examples 'assigning an already assigned user' do |is_multiline|
RSpec.shared_examples 'assigning an already assigned user' do |is_multiline|
before do
target.assignees = [assignee]
end
......
# frozen_string_literal: true
shared_examples 'unassigning a not assigned user' do |is_multiline|
RSpec.shared_examples 'unassigning a not assigned user' do |is_multiline|
before do
target.assignees = [assignee]
end
......
# frozen_string_literal: true
shared_examples 'security dashboard JSON endpoint' do
RSpec.shared_examples 'security dashboard JSON endpoint' do
context 'when the user is authenticated' do
let(:security_application_controller_user) { create(:user) }
......
......@@ -178,7 +178,7 @@ RSpec.shared_examples 'filters on each package_type' do |is_project: false|
end
end
shared_examples 'package workhorse uploads' do
RSpec.shared_examples 'package workhorse uploads' do
context 'without a workhorse header' do
let(:workhorse_token) { JWT.encode({ 'iss' => 'invalid header' }, Gitlab::Workhorse.secret, 'HS256') }
......
......@@ -2,7 +2,7 @@
require 'rake_helper'
describe 'geo:git:housekeeping' do
RSpec.describe 'geo:git:housekeeping' do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:registry) { ::Geo::ProjectRegistry.find_or_create_by!(project: project) }
......
......@@ -2,7 +2,7 @@
require 'rake_helper'
describe 'geo rake tasks', :geo do
RSpec.describe 'geo rake tasks', :geo do
include ::EE::GeoHelpers
before do
......
......@@ -2,7 +2,7 @@
require 'rake_helper'
describe 'EE check.rake' do
RSpec.describe 'EE check.rake' do
before do
Rake.application.rake_require 'ee/lib/tasks/gitlab/check', [Rails.root.to_s]
......
......@@ -2,7 +2,7 @@
require 'rake_helper'
describe 'gitlab:elastic namespace rake tasks', :elastic do
RSpec.describe 'gitlab:elastic namespace rake tasks', :elastic do
before do
Rake.application.rake_require 'tasks/gitlab/elastic'
stub_ee_application_setting(elasticsearch_indexing: true)
......
......@@ -2,7 +2,7 @@
require 'rake_helper'
describe 'gitlab:license namespace rake tasks' do
RSpec.describe 'gitlab:license namespace rake tasks' do
before do
Rake.application.rake_require 'tasks/gitlab/license'
end
......
......@@ -2,7 +2,7 @@
require 'rake_helper'
describe 'gitlab:packages namespace rake task' do
RSpec.describe 'gitlab:packages namespace rake task' do
before :all do
Rake.application.rake_require 'tasks/gitlab/packages/migrate'
end
......
......@@ -2,7 +2,7 @@
require 'rake_helper'
describe 'gitlab:seed:group_seed rake task' do
RSpec.describe 'gitlab:seed:group_seed rake task' do
let(:username) { 'group_seed' }
let!(:user) { create(:user, username: username) }
let(:task_params) { [2, username] }
......
# frozen_string_literal: true
require 'spec_helper'
describe DependencyProxy::FileUploader do
RSpec.describe DependencyProxy::FileUploader do
let(:blob) { create(:dependency_proxy_blob) }
let(:uploader) { described_class.new(blob, :file) }
let(:path) { Gitlab.config.dependency_proxy.storage_path }
......
# frozen_string_literal: true
require 'spec_helper'
describe Packages::PackageFileUploader do
RSpec.describe Packages::PackageFileUploader do
let(:package_file) { create(:package_file, :xml) }
let(:uploader) { described_class.new(package_file, :file) }
let(:path) { Gitlab.config.packages.storage_path }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe LdapFilterValidator do
RSpec.describe LdapFilterValidator do
let(:validator) { described_class.new(attributes: [:filter]) }
describe '#validates_each' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'admin/application_settings/_elasticsearch_form' do
RSpec.describe 'admin/application_settings/_elasticsearch_form' do
let_it_be(:admin) { create(:admin) }
let(:page) { Capybara::Node::Simple.new(rendered) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'admin/groups/_form' do
RSpec.describe 'admin/groups/_form' do
let_it_be(:admin) { create(:admin) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'admin/users/index' do
RSpec.describe 'admin/users/index' do
let(:should_check_namespace_plan) { false }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'clusters/clusters/show' do
RSpec.describe 'clusters/clusters/show' do
let_it_be(:user) { create(:user) }
shared_examples 'cluster health section' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'compliance_management/compliance_framework/_compliance_framework_badge.html.haml' do
RSpec.describe 'compliance_management/compliance_framework/_compliance_framework_badge.html.haml' do
let_it_be(:project) { build(:project, :with_compliance_framework) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'groups/edit.html.haml' do
RSpec.describe 'groups/edit.html.haml' do
let_it_be(:user) { create(:user) }
let(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'layouts/application' do
RSpec.describe 'layouts/application' do
let_it_be(:user) { create(:user) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'layouts/header/_current_user_dropdown' do
RSpec.describe 'layouts/header/_current_user_dropdown' do
let_it_be(:user) { create(:user) }
describe 'Buy CI Minutes link in user dropdown' do
......
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