Commit b38eb09a authored by Arturo Herrero's avatar Arturo Herrero

RSpec zero monkey patching mode

The plan for RSpec 4.0 is to disable monkey patching, reference:
https://rspec.info/blog/2013/07/the-plan-for-rspec-3/#zero-monkey-patching-mode
https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode

This commit enforces RSpec zero monkey patching mode.
parent db6f6337
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::FeatureFlagIssuesController do
RSpec.describe Projects::FeatureFlagIssuesController do
let_it_be(:project) { create(:project) }
let_it_be(:developer) { create(:user) }
let_it_be(:reporter) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Iterations list', :js do
RSpec.describe 'Iterations list', :js do
let(:now) { Time.now }
let_it_be(:group) { create(:group) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Merge Requests > User resets approvers', :js do
RSpec.describe 'Merge Requests > User resets approvers', :js do
include FeatureApprovalHelper
let(:project) { create(:project, :repository) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Feature flag issue links', :js do
RSpec.describe 'Feature flag issue links', :js do
include FeatureFlagHelpers
let_it_be(:developer) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::Pipelines::RunDastScan do
RSpec.describe Mutations::Pipelines::RunDastScan do
let(:group) { create(:group) }
let(:project) { create(:project, group: group) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::SecurityReportSummaryResolver do
RSpec.describe Resolvers::SecurityReportSummaryResolver do
include GraphqlHelpers
let_it_be(:pipeline) { double('project') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::Vulnerabilities::IssueLinksResolver do
RSpec.describe Resolvers::Vulnerabilities::IssueLinksResolver do
include GraphqlHelpers
describe '#resolve' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Pipeline'] do
RSpec.describe GitlabSchema.types['Pipeline'] do
it { expect(described_class.graphql_name).to eq('Pipeline') }
it 'includes the ee specific fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['SecurityReportSummarySection'] do
RSpec.describe GitlabSchema.types['SecurityReportSummarySection'] do
specify { expect(described_class.graphql_name).to eq('SecurityReportSummarySection') }
it 'has specific fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['SecurityReportSummary'] do
RSpec.describe GitlabSchema.types['SecurityReportSummary'] do
specify { expect(described_class.graphql_name).to eq('SecurityReportSummary') }
it 'has specific fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilityIssueLinkType'] do
RSpec.describe GitlabSchema.types['VulnerabilityIssueLinkType'] do
let(:expected_values) { %w[RELATED CREATED] }
subject { described_class.values.keys }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilityIssueLink'] do
RSpec.describe GitlabSchema.types['VulnerabilityIssueLink'] do
let(:expected_fields) { %i[id link_type issue] }
subject { described_class }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['VulnerabilityLocationSecretDetection'] do
RSpec.describe GitlabSchema.types['VulnerabilityLocationSecretDetection'] do
it do
expect(described_class).to have_graphql_fields(
:end_line,
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Admin::MergeRequestApprovalSettingsHelper do
RSpec.describe Admin::MergeRequestApprovalSettingsHelper do
describe '#show_compliance_merge_request_approval_settings?' do
using RSpec::Parameterized::TableSyntax
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::ApplicationSettingsHelper do
RSpec.describe EE::ApplicationSettingsHelper do
describe '.visible_attributes' do
context 'personal access token parameters' do
it { expect(visible_attributes).to include(*%i(max_personal_access_token_lifetime enforce_pat_expiration)) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::SubscribableBannerHelper do
RSpec.describe EE::SubscribableBannerHelper do
describe '#gitlab_subscription_or_license' do
subject { helper.gitlab_subscription_or_license }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Alerting::NotificationPayloadParser do
RSpec.describe Gitlab::Alerting::NotificationPayloadParser do
let(:project) { build_stubbed(:project) }
describe '.call' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::FixRubyObjectInAuditEvents, :migration, schema: 20200518114540 do
RSpec.describe Gitlab::BackgroundMigration::FixRubyObjectInAuditEvents, :migration, schema: 20200518114540 do
let(:audit_events) { table(:audit_events) }
it 'cleans up ruby/object in details field', :aggregate_failures do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::UpdateVulnerabilitiesFromDismissalFeedback, :migration, schema: 20200519201128 do
RSpec.describe Gitlab::BackgroundMigration::UpdateVulnerabilitiesFromDismissalFeedback, :migration, schema: 20200519201128 do
let(:users) { table(:users) }
let(:projects) { table(:projects) }
let(:vulnerabilities) { table(:vulnerabilities) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::IssuableMetadata do
RSpec.describe Gitlab::IssuableMetadata do
let_it_be(:user) { create(:user) }
let_it_be(:project1) { create(:project, :public, :repository, creator: user, namespace: user.namespace) }
let_it_be(:project2) { create(:project, :public, :repository, creator: user, namespace: user.namespace) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config::Entry::Secret do
RSpec.describe Gitlab::Ci::Config::Entry::Secret do
let(:entry) { described_class.new(config) }
describe 'validation' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config::Entry::Secrets do
RSpec.describe Gitlab::Ci::Config::Entry::Secrets do
let(:entry) { described_class.new(config) }
describe 'validation' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config::Entry::Vault::Engine do
RSpec.describe Gitlab::Ci::Config::Entry::Vault::Engine do
let(:entry) { described_class.new(config) }
describe 'validation' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config::Entry::Vault::Secret do
RSpec.describe Gitlab::Ci::Config::Entry::Vault::Secret do
let(:entry) { described_class.new(config) }
describe 'validation' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Geo::RegistryBatcher, :geo, :use_clean_rails_memory_store_caching do
RSpec.describe Gitlab::Geo::RegistryBatcher, :geo, :use_clean_rails_memory_store_caching do
describe '#next_range!' do
let(:model_class) { LfsObject }
let(:model_foreign_key) { registry_class::MODEL_FOREIGN_KEY }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::UsageDataCounters::IngressModsecurityCounter, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::UsageDataCounters::IngressModsecurityCounter, :clean_gitlab_redis_shared_state do
describe '.add' do
it 'increases packets_processed and packets_anomalous counters and sets statistics_unavailable counter' do
described_class.add(3, 10_200, 2_500)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe StatusPage::UsageDataCounters::IncidentCounter do
RSpec.describe StatusPage::UsageDataCounters::IncidentCounter do
it_behaves_like 'a redis usage counter', 'StatusPage::IncidentCounter', :publishes
it_behaves_like 'a redis usage counter', 'StatusPage::IncidentCounter', :unpublishes
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200519201128_migrate_vulnerability_dismissal_feedback.rb')
describe MigrateVulnerabilityDismissalFeedback, :migration, :sidekiq do
RSpec.describe MigrateVulnerabilityDismissalFeedback, :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', '20200518114540_schedule_fix_ruby_object_in_audit_events.rb')
describe ScheduleFixRubyObjectInAuditEvents do
RSpec.describe ScheduleFixRubyObjectInAuditEvents do
let(:audit_events) { table(:audit_events) }
it 'schedules background migrations' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe BoardUserPreference do
RSpec.describe BoardUserPreference do
before do
create(:board_user_preference)
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ProjectSecuritySetting do
RSpec.describe ProjectSecuritySetting do
describe 'associations' do
subject { create(:project_security_setting) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Packages::Composer::PackagesPresenter do
RSpec.describe ::Packages::Composer::PackagesPresenter do
using RSpec::Parameterized::TableSyntax
let_it_be(:package_name) { 'sample-project' }
......
......@@ -2,7 +2,7 @@
require "spec_helper"
describe API::Commits do
RSpec.describe API::Commits do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :repository, creator: user, path: "my.project") }
let(:project_id) { project.id }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Running a DAST Scan' do
RSpec.describe 'Running a DAST Scan' do
include GraphqlHelpers
let(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'getting a compliance frameworks list for a project' do
RSpec.describe 'getting a compliance frameworks list for a project' do
include GraphqlHelpers
let_it_be(:project_member) { create(:project_member, :maintainer) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::API::ResourceWeightEvents do
RSpec.describe ::API::ResourceWeightEvents do
let_it_be(:user) { create(:user) }
let_it_be(:project, reload: true) { create(:project, :public, namespace: user.namespace) }
let_it_be(:issue) { create(:issue, project: project, author: user) }
......
......@@ -12,7 +12,7 @@ require 'spec_helper'
# - maintainer
# because they are 3 edge cases of using wiki pages.
describe API::Wikis do
RSpec.describe API::Wikis do
include WorkhorseHelpers
let_it_be(:user) { create(:user) }
......
......@@ -51,7 +51,7 @@ RSpec.describe Projects::Analytics::CodeReviewsController, type: :request do
end
end
describe Projects::Analytics::CodeReviewsController, type: :controller do
RSpec.describe Projects::Analytics::CodeReviewsController, type: :controller do
let(:user) { create :user }
let(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Evidences::ReleaseEntity do
RSpec.describe Evidences::ReleaseEntity do
let(:project) { create(:project, :repository) }
let(:release) { build(:release, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Evidences::BuildArtifactEntity do
RSpec.describe Evidences::BuildArtifactEntity do
include Gitlab::Routing
let(:build) { create(:ci_build, :artifacts) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Evidences::EvidenceEntity do
RSpec.describe Evidences::EvidenceEntity do
let(:project) { create(:project, :repository) }
let(:release) { create(:release, project: project) }
let(:evidence) { build(:evidence, release: release) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Ci::CompareLicenseScanningReportsService do
RSpec.describe Ci::CompareLicenseScanningReportsService do
let_it_be(:project) { create(:project, :repository) }
let(:service) { described_class.new(project, nil) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Ci::CompareSecurityReportsService do
RSpec.describe Ci::CompareSecurityReportsService do
let_it_be(:project) { create(:project, :repository) }
let(:current_user) { build(:user, :admin) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Ci::PipelineBridgeStatusService do
RSpec.describe Ci::PipelineBridgeStatusService do
let_it_be(:project) { create(:project) }
let(:user) { build(:user) }
let(:pipeline) { build(:ci_pipeline, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Ci::RunDastScanService do
RSpec.describe Ci::RunDastScanService do
let(:project) { create(:project) }
let(:branch) { SecureRandom.hex }
let(:target_url) { FFaker::Internet.uri(:http) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::AllowedEmailDomains::UpdateService do
RSpec.describe EE::AllowedEmailDomains::UpdateService do
let(:group) { create(:group) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Integrations::Test::ProjectService do
RSpec.describe ::Integrations::Test::ProjectService do
let(:user) { double('user') }
describe '#execute' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Releases::CreateEvidenceService do
RSpec.describe Releases::CreateEvidenceService do
include Gitlab::Routing
let(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Security::IngressModsecurityUsageService do
RSpec.describe EE::Security::IngressModsecurityUsageService do
describe '#execute' do
let(:environment) { create(:environment) }
let(:ingress_mode) { :modsecurity_blocking }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Elastic::ProcessInitialBookkeepingService do
RSpec.describe Elastic::ProcessInitialBookkeepingService do
let(:project) { create(:project) }
let(:issue) { create(:issue) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::ReplicationToggleRequestService, :geo do
RSpec.describe Geo::ReplicationToggleRequestService, :geo do
include ::EE::GeoHelpers
include ApiHelpers
......
# frozen_string_literal: true
require 'spec_helper'
describe Packages::Composer::ComposerJsonService do
RSpec.describe Packages::Composer::ComposerJsonService do
describe '#execute' do
let(:branch) { project.repository.find_branch('master') }
let(:target) { branch.target }
......
# frozen_string_literal: true
require 'spec_helper'
describe Packages::Composer::CreatePackageService do
RSpec.describe Packages::Composer::CreatePackageService do
include EE::PackagesManagerApiSpecHelpers
let_it_be(:package_name) { 'composer-package-name' }
......
# frozen_string_literal: true
require 'spec_helper'
describe Packages::Composer::VersionParserService do
RSpec.describe Packages::Composer::VersionParserService do
let_it_be(:params) { {} }
describe '#execute' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::Alerting::NotifyService do
RSpec.describe Projects::Alerting::NotifyService do
let_it_be(:project, refind: true) { create(:project) }
describe '#execute' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RequirementsManagement::ProcessTestReportsService do
RSpec.describe RequirementsManagement::ProcessTestReportsService do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let_it_be(:build) { create(:ee_ci_build, :requirements_report, project: project, user: user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::Configuration::SaveAutoFixService do
RSpec.describe Security::Configuration::SaveAutoFixService do
describe '#execute' do
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::ReportSummaryService, '#execute' do
RSpec.describe Security::ReportSummaryService, '#execute' do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:pipeline) { create(:ci_pipeline, :success, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::ScannedResourcesCountingService, '#execute' do
RSpec.describe Security::ScannedResourcesCountingService, '#execute' do
before do
stub_licensed_features(sast: true, dependency_scanning: true, container_scanning: true, dast: true)
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Security::VulnerabilityCountingService, '#execute' do
RSpec.describe Security::VulnerabilityCountingService, '#execute' do
before do
stub_licensed_features(sast: true, dependency_scanning: true, container_scanning: true, dast: true)
end
......
# frozen_string_literal: true
shared_examples 'a Geo framework registry' do
RSpec.shared_examples 'a Geo framework registry' do
let(:registry_class_factory) { described_class.underscore.tr('/', '_').to_sym }
context 'finders' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'layouts/header/_new_dropdown' do
RSpec.describe 'layouts/header/_new_dropdown' do
let(:user) { create(:user) }
context 'group-specific links' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Geo::RegistrySyncWorker, :geo, :use_sql_query_cache_for_tracking_db do
RSpec.describe Geo::RegistrySyncWorker, :geo, :use_sql_query_cache_for_tracking_db do
include ::EE::GeoHelpers
include ExclusiveLeaseHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe IngressModsecurityCounterMetricsWorker, :clean_gitlab_redis_shared_state do
RSpec.describe IngressModsecurityCounterMetricsWorker, :clean_gitlab_redis_shared_state do
include ExclusiveLeaseHelpers
subject(:worker) { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe RequirementsManagement::ProcessRequirementsReportsWorker do
RSpec.describe RequirementsManagement::ProcessRequirementsReportsWorker do
describe '#perform' do
context 'build exists' do
let(:build) { create(:ci_build) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Groups::ImportsController do
RSpec.describe Groups::ImportsController do
describe 'GET #show' do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group, :private) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Projects::Pipelines::TestsController do
RSpec.describe Projects::Pipelines::TestsController do
let(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) }
let(:pipeline) { create(:ci_pipeline, project: project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Registrations::ExperienceLevelsController do
RSpec.describe Registrations::ExperienceLevelsController do
let_it_be(:namespace) { create(:group, path: 'group-path' ) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Import/Export - Group Import', :js do
RSpec.describe 'Import/Export - Group Import', :js do
let_it_be(:user) { create(:user) }
let_it_be(:import_path) { "#{Dir.tmpdir}/group_import_spec" }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Projects > Activity > User sees design Activity', :js do
RSpec.describe 'Projects > Activity > User sees design Activity', :js do
include DesignManagementTestHelpers
let_it_be(:uploader) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::AlertManagement::Alerts::SetAssignees do
RSpec.describe Mutations::AlertManagement::Alerts::SetAssignees do
let_it_be(:starting_assignee) { create(:user) }
let_it_be(:unassigned_user) { create(:user) }
let_it_be(:alert) { create(:alert_management_alert, assignees: [starting_assignee]) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Mutations::ContainerExpirationPolicies::Update do
RSpec.describe Mutations::ContainerExpirationPolicies::Update do
using RSpec::Parameterized::TableSyntax
let_it_be(:project, reload: true) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe LooksAhead do
RSpec.describe LooksAhead do
include GraphqlHelpers
let_it_be(:the_user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::ProjectMembersResolver do
RSpec.describe Resolvers::ProjectMembersResolver do
include GraphqlHelpers
context "with a group" do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::ProjectPipelineResolver do
RSpec.describe Resolvers::ProjectPipelineResolver do
include GraphqlHelpers
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Resolvers::UsersResolver do
RSpec.describe Resolvers::UsersResolver do
include GraphqlHelpers
let_it_be(:user1) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['AccessLevelEnum'] do
RSpec.describe GitlabSchema.types['AccessLevelEnum'] do
specify { expect(described_class.graphql_name).to eq('AccessLevelEnum') }
it 'exposes all the existing access levels' do
......
# frozen_string_literal: true
require 'spec_helper'
describe GitlabSchema.types['AccessLevel'] do
RSpec.describe GitlabSchema.types['AccessLevel'] do
specify { expect(described_class.graphql_name).to eq('AccessLevel') }
specify { expect(described_class).to require_graphql_authorizations(nil) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['ReleaseEvidence'] do
RSpec.describe GitlabSchema.types['ReleaseEvidence'] do
it { expect(described_class).to require_graphql_authorizations(:download_code) }
it 'has the expected fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Types::GroupMemberType do
RSpec.describe Types::GroupMemberType do
specify { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Group) }
specify { expect(described_class.graphql_name).to eq('GroupMember') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['MilestoneStats'] do
RSpec.describe GitlabSchema.types['MilestoneStats'] do
it { expect(described_class).to require_graphql_authorizations(:read_milestone) }
it 'has the expected fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Types::ProjectMemberType do
RSpec.describe Types::ProjectMemberType do
specify { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Project) }
specify { expect(described_class.graphql_name).to eq('ProjectMember') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['ReleaseAssetLink'] do
RSpec.describe GitlabSchema.types['ReleaseAssetLink'] do
it { expect(described_class).to require_graphql_authorizations(:read_release) }
it 'has the expected fields' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Types::Snippets::FileInputActionEnum do
RSpec.describe Types::Snippets::FileInputActionEnum do
specify { expect(described_class.graphql_name).to eq('SnippetFileInputActionEnum') }
it 'exposes all file input action types' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Types::Snippets::FileInputType do
RSpec.describe Types::Snippets::FileInputType do
specify { expect(described_class.graphql_name).to eq('SnippetFileInputType') }
it 'has the correct arguments' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['UntrustedRegexp'] do
RSpec.describe GitlabSchema.types['UntrustedRegexp'] do
using RSpec::Parameterized::TableSyntax
specify { expect(described_class.graphql_name).to eq('UntrustedRegexp') }
......
......@@ -2,7 +2,7 @@
require "spec_helper"
describe Analytics::UniqueVisitsHelper do
RSpec.describe Analytics::UniqueVisitsHelper do
include Devise::Test::ControllerHelpers
describe '#track_visit' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe SubscribableBannerHelper do
RSpec.describe SubscribableBannerHelper do
describe '#display_subscription_banner!' do
it 'is over-written in EE' do
expect { helper.display_subscription_banner! }.not_to raise_error
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Entities::DeployKey do
RSpec.describe API::Entities::DeployKey do
describe '#as_json' do
subject { entity.as_json }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Entities::DeployKeysProject do
RSpec.describe API::Entities::DeployKeysProject do
describe '#as_json' do
subject { entity.as_json }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Entities::SSHKey do
RSpec.describe API::Entities::SSHKey do
describe '#as_json' do
subject { entity.as_json }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Validations::Validators::UntrustedRegexp do
RSpec.describe API::Validations::Validators::UntrustedRegexp do
include ApiValidatorsHelpers
subject do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::Filter::JiraImport::AdfToCommonmarkFilter do
RSpec.describe Banzai::Filter::JiraImport::AdfToCommonmarkFilter do
include FilterSpecHelper
let_it_be(:fixtures_path) { 'lib/kramdown/atlassian_document_format' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::Pipeline::JiraImport::AdfCommonmarkPipeline do
RSpec.describe Banzai::Pipeline::JiraImport::AdfCommonmarkPipeline do
let_it_be(:fixtures_path) { 'lib/kramdown/atlassian_document_format' }
it 'converts text in Atlassian Document Format ' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ExtractsRef do
RSpec.describe ExtractsRef do
include described_class
include RepoHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Analytics::UniqueVisits, :clean_gitlab_redis_shared_state do
RSpec.describe Gitlab::Analytics::UniqueVisits, :clean_gitlab_redis_shared_state do
let(:unique_visits) { Gitlab::Analytics::UniqueVisits.new }
let(:target1_id) { 'g_analytics_contribution' }
let(:target2_id) { 'g_analytics_insights' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Build::Releaser do
RSpec.describe Gitlab::Ci::Build::Releaser do
subject { described_class.new(config: config[:release]).script }
describe '#script' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::TestReportSummary do
RSpec.describe Gitlab::Ci::Reports::TestReportSummary do
let(:build_report_result_1) { build(:ci_build_report_result) }
let(:build_report_result_2) { build(:ci_build_report_result, :with_junit_success) }
let(:test_report_summary) { described_class.new([build_report_result_1, build_report_result_2]) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::TestSuiteSummary do
RSpec.describe Gitlab::Ci::Reports::TestSuiteSummary do
let(:build_report_result_1) { build(:ci_build_report_result) }
let(:build_report_result_2) { build(:ci_build_report_result, :with_junit_success) }
let(:test_suite_summary) { described_class.new([build_report_result_1, build_report_result_2]) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::DataBuilder::Alert do
RSpec.describe Gitlab::DataBuilder::Alert do
let_it_be(:project) { create(:project) }
let_it_be(:alert) { create(:alert_management_alert, project: project) }
......
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.
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.
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