Commit 4210d5ba authored by Jan Provaznik's avatar Jan Provaznik

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

RSpec zero monkey patching mode

See merge request gitlab-org/gitlab!33725
parents 9daed804 22693930
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Analytics::CycleAnalytics::Summary::Group::StageSummary do
RSpec.describe Gitlab::Analytics::CycleAnalytics::Summary::Group::StageSummary do
let(:group) { create(:group) }
let(:project) { create(:project, :repository, namespace: group) }
let(:project_2) { create(:project, :repository, namespace: group) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Analytics::CycleAnalytics::Summary::Group::StageTimeSummary do
RSpec.describe Gitlab::Analytics::CycleAnalytics::Summary::Group::StageTimeSummary do
let(:group) { create(:group) }
let(:project) { create(:project, :repository, namespace: group) }
let(:project_2) { create(:project, :repository, namespace: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Analytics::TypeOfWork::TasksByType do
RSpec.describe Gitlab::Analytics::TypeOfWork::TasksByType do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) }
let_it_be(:other_group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Analytics do
RSpec.describe Gitlab::Analytics do
describe '.productivity_analytics_enabled?' do
it 'is enabled by default' do
expect(described_class).to be_productivity_analytics_enabled
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Audit::Events::Preloader do
RSpec.describe Gitlab::Audit::Events::Preloader do
describe '.preload!' do
let_it_be(:audit_events) { create_list(:audit_event, 2) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Audit::Levels::Group do
RSpec.describe Gitlab::Audit::Levels::Group do
describe '#apply' do
let_it_be(:group) { create(:group) }
let_it_be(:subgroup) { create(:group, parent: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Audit::Levels::Instance do
RSpec.describe Gitlab::Audit::Levels::Instance do
describe '#apply' do
let_it_be(:audit_events) do
[
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Audit::Levels::Project do
RSpec.describe Gitlab::Audit::Levels::Project do
describe '#apply' do
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Audit::NullAuthor do
RSpec.describe Gitlab::Audit::NullAuthor do
subject { described_class }
describe '.for' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Audit::UnauthenticatedAuthor do
RSpec.describe Gitlab::Audit::UnauthenticatedAuthor do
describe '#initialize' do
it 'sets correct attributes' do
expect(described_class.new(name: 'Peppa Pig'))
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::AuthFinders do
RSpec.describe Gitlab::Auth::AuthFinders do
include described_class
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::DynamicSettings do
RSpec.describe Gitlab::Auth::GroupSaml::DynamicSettings do
let(:saml_provider) { create(:saml_provider) }
let(:group) { saml_provider.group }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::FailureHandler do
RSpec.describe Gitlab::Auth::GroupSaml::FailureHandler do
include Gitlab::Routing
let(:parent_handler) { double }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::GmaMembershipEnforcer do
RSpec.describe Gitlab::Auth::GroupSaml::GmaMembershipEnforcer do
include ProjectForksHelper
let_it_be(:group) { create(:group_with_managed_accounts, :private) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::GroupLookup do
RSpec.describe Gitlab::Auth::GroupSaml::GroupLookup do
let(:query_string) { 'group_path=the-group' }
let(:path_info) { double }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::IdentityLinker do
RSpec.describe Gitlab::Auth::GroupSaml::IdentityLinker do
let(:user) { create(:user) }
let(:provider) { 'group_saml' }
let(:uid) { user.email }
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::MembershipEnforcer do
RSpec.describe Gitlab::Auth::GroupSaml::MembershipEnforcer do
let(:user) { create(:user) }
let(:identity) { create(:group_saml_identity, user: user) }
let(:group) { identity.saml_provider.group }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::MembershipUpdater do
RSpec.describe Gitlab::Auth::GroupSaml::MembershipUpdater do
let(:user) { create(:user) }
let(:saml_provider) { create(:saml_provider) }
let(:group) { saml_provider.group }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::ResponseCheck do
RSpec.describe Gitlab::Auth::GroupSaml::ResponseCheck do
describe 'validations' do
let(:name_id) { '123-456-789' }
let(:name_id_format) { 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::ResponseStore do
RSpec.describe Gitlab::Auth::GroupSaml::ResponseStore do
let(:raw_response) { '<xml></xml>' }
let(:session_id) { '123-456-789' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::SsoEnforcer do
RSpec.describe Gitlab::Auth::GroupSaml::SsoEnforcer do
let(:saml_provider) { build_stubbed(:saml_provider, enforced_sso: true) }
let(:session) { {} }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::SsoState do
RSpec.describe Gitlab::Auth::GroupSaml::SsoState do
let(:saml_provider_id) { 10 }
subject { described_class.new(saml_provider_id) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::TokenActor do
RSpec.describe Gitlab::Auth::GroupSaml::TokenActor do
let(:saml_provider) { create(:saml_provider) }
let(:group) { saml_provider.group }
......
......@@ -3,7 +3,7 @@ require 'spec_helper'
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::User do
RSpec.describe Gitlab::Auth::GroupSaml::User do
let(:uid) { 1234 }
let(:auth_hash) { OmniAuth::AuthHash.new(uid: uid) }
let(:saml_provider) { create(:saml_provider) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::GroupSaml::XmlResponse do
RSpec.describe Gitlab::Auth::GroupSaml::XmlResponse do
let(:saml_provider) { create(:saml_provider) }
let(:group) { saml_provider.group }
let(:raw_response) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Ldap::Access do
RSpec.describe Gitlab::Auth::Ldap::Access do
include LdapHelpers
let(:user) { create(:omniauth_user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Ldap::Adapter do
RSpec.describe Gitlab::Auth::Ldap::Adapter do
include LdapHelpers
let(:adapter) { ldap_adapter('ldapmain') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Ldap::Person do
RSpec.describe Gitlab::Auth::Ldap::Person do
include LdapHelpers
let(:entry) { ldap_user_entry('john.doe') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Ldap::User do
RSpec.describe Gitlab::Auth::Ldap::User do
include LdapHelpers
let(:ldap_user) { described_class.new(auth_hash) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::OAuth::AuthHash do
RSpec.describe Gitlab::Auth::OAuth::AuthHash do
let(:auth_hash) do
described_class.new(
OmniAuth::AuthHash.new(
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::OAuth::User do
RSpec.describe Gitlab::Auth::OAuth::User do
include LdapHelpers
describe 'login through kerberos with linkable LDAP user' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Saml::User do
RSpec.describe Gitlab::Auth::Saml::User do
include LdapHelpers
include LoginHelpers
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Smartcard::Certificate do
RSpec.describe Gitlab::Auth::Smartcard::Certificate do
let(:subject_dn) { '/O=Random Corp Ltd/CN=gitlab-user/emailAddress=gitlab-user@random-corp.org' }
let(:issuer_dn) { '/O=Random Corp Ltd/CN=Random Corp' }
let(:certificate_header) { 'certificate' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Smartcard::LdapCertificate do
RSpec.describe Gitlab::Auth::Smartcard::LdapCertificate do
let(:certificate_header) { 'certificate' }
let(:openssl_certificate_store) { instance_double(OpenSSL::X509::Store) }
let(:user_build_service) { instance_double(Users::BuildService) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Smartcard::SANExtension do
RSpec.describe Gitlab::Auth::Smartcard::SANExtension do
let(:fqdn) { 'gitlab.example.com' }
let(:extension_factory) { OpenSSL::X509::ExtensionFactory.new(nil, cert) }
let(:san_extension) { described_class.new(cert, fqdn) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Smartcard::SessionEnforcer do
RSpec.describe Gitlab::Auth::Smartcard::SessionEnforcer do
describe '#update_session' do
let(:session) { {} }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth::Smartcard::Session do
RSpec.describe Gitlab::Auth::Smartcard::Session do
describe '#active?' do
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Auth do
RSpec.describe Gitlab::Auth do
let(:gl_auth) { described_class }
let!(:user) do
create(:user,
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::AuthorityAnalyzer do
RSpec.describe Gitlab::AuthorityAnalyzer do
describe '#calculate' do
let(:project) { create(:project, :repository) }
let(:author) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::FixOrphanPromotedIssues, schema: 20200207185149 do
RSpec.describe Gitlab::BackgroundMigration::FixOrphanPromotedIssues, schema: 20200207185149 do
let(:users) { table(:users) }
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
......
......@@ -5,7 +5,7 @@ require './db/post_migrate/20191115115043_migrate_epic_mentions_to_db'
require './db/post_migrate/20191115115522_migrate_epic_notes_mentions_to_db'
require './db/post_migrate/20200124110831_migrate_design_notes_mentions_to_db'
describe Gitlab::BackgroundMigration::UserMentions::CreateResourceUserMention do
RSpec.describe Gitlab::BackgroundMigration::UserMentions::CreateResourceUserMention do
include MigrationsHelpers
context 'when migrating data' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Checks::ChangeAccess do
RSpec.describe Gitlab::Checks::ChangeAccess do
describe '#exec' do
include_context 'push rules checks context'
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Checks::DiffCheck do
RSpec.describe Gitlab::Checks::DiffCheck do
include FakeBlobHelpers
include_context 'push rules checks context'
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config::Entry::Job do
RSpec.describe Gitlab::Ci::Config::Entry::Job do
let(:entry) { described_class.new(config, name: :rspec) }
describe 'validations' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config::Required::Processor do
RSpec.describe Gitlab::Ci::Config::Required::Processor do
subject { described_class.new(config).perform }
let(:config) { { image: 'ruby:2.5.3' } }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::LicenseCompliance::LicenseScanning do
RSpec.describe Gitlab::Ci::Parsers::LicenseCompliance::LicenseScanning do
describe '#parse!' do
let(:report) { Gitlab::Ci::Reports::LicenseScanning::Report.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Metrics::Generic do
RSpec.describe Gitlab::Ci::Parsers::Metrics::Generic do
describe '#parse!' do
subject { described_class.new.parse!(data, report) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::Common do
RSpec.describe Gitlab::Ci::Parsers::Security::Common do
describe '#parse!' do
let(:artifact) { build(:ee_ci_job_artifact, :dependency_scanning) }
let(:report) { Gitlab::Ci::Reports::Security::Report.new(artifact.file_type, 'sha', 2.weeks.ago) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::ContainerScanning do
RSpec.describe Gitlab::Ci::Parsers::Security::ContainerScanning do
let(:parser) { described_class.new }
let(:project) { artifact.project }
let(:pipeline) { artifact.job.pipeline }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::Dast do
RSpec.describe Gitlab::Ci::Parsers::Security::Dast do
using RSpec::Parameterized::TableSyntax
describe '#parse!' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::DependencyList do
RSpec.describe Gitlab::Ci::Parsers::Security::DependencyList do
let(:parser) { described_class.new(project, sha) }
let(:project) { create(:project) }
let(:sha) { '4242424242424242' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::DependencyScanning do
RSpec.describe Gitlab::Ci::Parsers::Security::DependencyScanning do
using RSpec::Parameterized::TableSyntax
describe '#parse!' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::Formatters::Dast do
RSpec.describe Gitlab::Ci::Parsers::Security::Formatters::Dast do
let(:formatter) { described_class.new(parsed_report) }
let(:parsed_report) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::Formatters::DependencyList do
RSpec.describe Gitlab::Ci::Parsers::Security::Formatters::DependencyList do
let(:formatter) { described_class.new(project, sha) }
let(:project) { create(:project) }
let(:sha) { '4242424242424242' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::Sast do
RSpec.describe Gitlab::Ci::Parsers::Security::Sast do
describe '#parse!' do
subject(:parser) { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::ScannedResources do
RSpec.describe Gitlab::Ci::Parsers::Security::ScannedResources do
describe '#scanned_resources_count' do
let(:parser) { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Parsers::Security::SecretDetection do
RSpec.describe Gitlab::Ci::Parsers::Security::SecretDetection do
describe '#parse!' do
subject(:parser) { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Gitlab::Ci::Pipeline::Chain::Limit::Activity do
RSpec.describe ::Gitlab::Ci::Pipeline::Chain::Limit::Activity do
let_it_be(:namespace) { create(:namespace) }
let_it_be(:project) { create(:project, namespace: namespace) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Gitlab::Ci::Pipeline::Chain::Limit::JobActivity do
RSpec.describe ::Gitlab::Ci::Pipeline::Chain::Limit::JobActivity do
let_it_be(:namespace) { create(:namespace) }
let_it_be(:project) { create(:project, namespace: namespace) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Gitlab::Ci::Pipeline::Chain::Limit::Size do
RSpec.describe ::Gitlab::Ci::Pipeline::Chain::Limit::Size do
let_it_be(:namespace) { create(:namespace) }
let_it_be(:project, reload: true) { create(:project, :repository, namespace: namespace) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::DependencyList::Dependency do
RSpec.describe Gitlab::Ci::Reports::DependencyList::Dependency do
let(:dependency_nokogiri) { build(:dependency, :nokogiri, :with_vulnerabilities) }
context 'initialize' do
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'benchmark/ips'
describe Gitlab::Ci::Reports::DependencyList::Report do
RSpec.describe Gitlab::Ci::Reports::DependencyList::Report do
let(:report) { described_class.new }
describe '#add_dependency' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::LicenseScanning::License do
RSpec.describe Gitlab::Ci::Reports::LicenseScanning::License do
describe 'equality' do
let(:blank) { described_class.new(id: nil, name: nil, url: nil) }
let(:v1_mit) { described_class.new(id: nil, name: 'MIT', url: '') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::LicenseScanning::Report do
RSpec.describe Gitlab::Ci::Reports::LicenseScanning::Report do
include LicenseScanningReportHelpers
describe '#by_license_name' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::LicenseScanning::ReportsComparer do
RSpec.describe Gitlab::Ci::Reports::LicenseScanning::ReportsComparer do
let(:report_1) { build :ci_reports_license_scanning_report, :report_1 }
let(:report_2) { build :ci_reports_license_scanning_report, :report_2 }
let(:report_comparer) { described_class.new(report_1, report_2) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Metrics::Report do
RSpec.describe Gitlab::Ci::Reports::Metrics::Report do
let(:report) { described_class.new }
describe '#add_metric' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Metrics::ReportsComparer do
RSpec.describe Gitlab::Ci::Reports::Metrics::ReportsComparer do
let(:first_report) { build :ci_reports_metrics_report, :base_metrics }
let(:second_report) { build :ci_reports_metrics_report, :head_metrics }
let(:report_comparer) { described_class.new(first_report, second_report) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::AggregatedReport do
RSpec.describe Gitlab::Ci::Reports::Security::AggregatedReport do
subject { described_class.new(reports, occurrences) }
let(:reports) { build_list(:ci_reports_security_report, 1) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Identifier do
RSpec.describe Gitlab::Ci::Reports::Security::Identifier do
describe '#initialize' do
subject { described_class.new(**params) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Locations::ContainerScanning do
RSpec.describe Gitlab::Ci::Reports::Security::Locations::ContainerScanning do
let(:params) do
{
image: 'registry.gitlab.com/my/project:latest',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Locations::Dast do
RSpec.describe Gitlab::Ci::Reports::Security::Locations::Dast do
let(:params) do
{
hostname: 'my-app.com',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Locations::DependencyScanning do
RSpec.describe Gitlab::Ci::Reports::Security::Locations::DependencyScanning do
let(:params) do
{
file_path: 'app/pom.xml',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Locations::Sast do
RSpec.describe Gitlab::Ci::Reports::Security::Locations::Sast do
let(:params) do
{
file_path: 'src/main/App.java',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Locations::SecretDetection do
RSpec.describe Gitlab::Ci::Reports::Security::Locations::SecretDetection do
let(:params) do
{
file_path: 'src/main/App.java',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Occurrence do
RSpec.describe Gitlab::Ci::Reports::Security::Occurrence do
describe '#initialize' do
subject { described_class.new(**params) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Report do
RSpec.describe Gitlab::Ci::Reports::Security::Report do
let(:report) { described_class.new('sast', commit_sha, created_at) }
let(:commit_sha) { "d8978e74745e18ce44d88814004d4255ac6a65bb" }
let(:created_at) { 2.weeks.ago }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Reports do
RSpec.describe Gitlab::Ci::Reports::Security::Reports do
let(:commit_sha) { '20410773a37f49d599e5f0d45219b39304763538' }
let(:security_reports) { described_class.new(commit_sha) }
let(:artifact) { create(:ee_ci_job_artifact, :sast) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::Scanner do
RSpec.describe Gitlab::Ci::Reports::Security::Scanner do
describe '#initialize' do
subject { described_class.new(**params) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::Security::VulnerabilityReportsComparer do
RSpec.describe Gitlab::Ci::Reports::Security::VulnerabilityReportsComparer do
let(:identifier) { build(:vulnerabilities_identifier) }
let(:base_vulnerability) { build(:vulnerabilities_occurrence, report_type: :sast, identifiers: [identifier], location_fingerprint: '123', confidence: Vulnerabilities::Occurrence::CONFIDENCE_LEVELS[:high], severity: Vulnerabilities::Occurrence::SEVERITY_LEVELS[:critical]) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Container-Scanning.gitlab-ci.yml' do
RSpec.describe 'Container-Scanning.gitlab-ci.yml' do
subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Container-Scanning') }
describe 'the created pipeline' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'DAST.gitlab-ci.yml' do
RSpec.describe 'DAST.gitlab-ci.yml' do
subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('DAST') }
describe 'the created pipeline' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'Dependency-Scanning.gitlab-ci.yml' do
RSpec.describe 'Dependency-Scanning.gitlab-ci.yml' do
subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('Dependency-Scanning') }
describe 'the created pipeline' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'License-Scanning.gitlab-ci.yml' do
RSpec.describe 'License-Scanning.gitlab-ci.yml' do
subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('License-Scanning') }
describe 'the created pipeline' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'SAST.gitlab-ci.yml' do
RSpec.describe 'SAST.gitlab-ci.yml' do
subject(:template) { Gitlab::Template::GitlabCiYmlTemplate.find('SAST') }
describe 'the created pipeline' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::YamlProcessor do
RSpec.describe Gitlab::Ci::YamlProcessor do
describe 'Bridge Needs' do
let(:config) do
{
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::CIDR do
RSpec.describe Gitlab::CIDR do
using RSpec::Parameterized::TableSyntax
context 'validation' do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::CodeOwners::Entry do
RSpec.describe Gitlab::CodeOwners::Entry do
subject(:entry) do
described_class.new(
"/**/file",
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::CodeOwners::File do
RSpec.describe Gitlab::CodeOwners::File do
include FakeBlobHelpers
let(:project) { build(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::CodeOwners::GroupsLoader do
RSpec.describe Gitlab::CodeOwners::GroupsLoader do
let(:text) do
<<~TXT
This is a long text that mentions some groups.
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::CodeOwners::Loader do
RSpec.describe Gitlab::CodeOwners::Loader do
include FakeBlobHelpers
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, namespace: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::CodeOwners::ReferenceExtractor do
RSpec.describe Gitlab::CodeOwners::ReferenceExtractor do
let(:text) do
<<~TXT
This is a long text that mentions some users.
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::CodeOwners::UsersLoader do
RSpec.describe Gitlab::CodeOwners::UsersLoader do
let(:text) do
<<~TXT
This is a long text that mentions some users.
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::CodeOwners::Validator do
RSpec.describe Gitlab::CodeOwners::Validator do
include FakeBlobHelpers
let_it_be(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::CodeOwners do
RSpec.describe Gitlab::CodeOwners do
include FakeBlobHelpers
let!(:code_owner) { create(:user, username: 'owner-1') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Com do
RSpec.describe Gitlab::Com do
it { expect(described_class.l1_cache_backend).to eq(Gitlab::ProcessMemoryCache.cache_backend) }
it { expect(described_class.l2_cache_backend).to eq(Rails.cache) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ConanToken do
RSpec.describe Gitlab::ConanToken do
let(:base_secret) { SecureRandom.base64(64) }
let(:jwt_secret) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ContributionAnalytics::DataCollector do
RSpec.describe Gitlab::ContributionAnalytics::DataCollector do
describe '#totals' do
it 'collects event counts grouped by users by calling #base_query' do
group = create(:group)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::CustomFileTemplates do
RSpec.describe Gitlab::CustomFileTemplates do
using RSpec::Parameterized::TableSyntax
let_it_be(:instance_template_project) { create(:project, :custom_repo, files: template_files('instance')) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Database::LoadBalancing::ActiveRecordProxy do
RSpec.describe Gitlab::Database::LoadBalancing::ActiveRecordProxy do
describe '#connection' do
it 'returns a connection proxy' do
dummy = Class.new do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Database::LoadBalancing::ConnectionProxy do
RSpec.describe Gitlab::Database::LoadBalancing::ConnectionProxy do
let(:proxy) { described_class.new }
describe '#select' do
......
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