Commit 94247ca4 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 API::Helpers::Packages::DependencyProxyHelpers do
RSpec.describe API::Helpers::Packages::DependencyProxyHelpers do
let_it_be(:helper) { Class.new.include(described_class).new }
describe 'redirect_registry_request' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Helpers::PackagesHelpers do
RSpec.describe API::Helpers::PackagesHelpers do
let_it_be(:helper) { Class.new.include(described_class).new }
let_it_be(:project) { create(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Helpers::PackagesManagerClientsHelpers do
RSpec.describe API::Helpers::PackagesManagerClientsHelpers do
let_it_be(:personal_access_token) { create(:personal_access_token) }
let_it_be(:username) { personal_access_token.user.username }
let_it_be(:helper) { Class.new.include(described_class).new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Atlassian::JiraConnect::Client do
RSpec.describe Atlassian::JiraConnect::Client do
include StubRequests
subject { described_class.new('https://gitlab-test.atlassian.net', 'sample_secret') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Atlassian::JiraConnect::Serializers::AuthorEntity do
RSpec.describe Atlassian::JiraConnect::Serializers::AuthorEntity do
subject { described_class.represent(user).as_json }
context 'when object is a User model' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Atlassian::JiraConnect::Serializers::BranchEntity do
RSpec.describe Atlassian::JiraConnect::Serializers::BranchEntity do
let(:project) { create(:project, :repository) }
let(:branch) { project.repository.find_branch('improve/awesome') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Atlassian::JiraConnect::Serializers::RepositoryEntity do
RSpec.describe Atlassian::JiraConnect::Serializers::RepositoryEntity do
subject do
project = create(:project, :repository)
commits = [project.commit]
......
......@@ -2,7 +2,7 @@
require 'fast_spec_helper'
describe Atlassian::JiraIssueKeyExtractor do
RSpec.describe Atlassian::JiraIssueKeyExtractor do
describe '.has_keys?' do
subject { described_class.has_keys?(string) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Audit::Changes do
RSpec.describe Audit::Changes do
subject(:foo_instance) { Class.new { include Audit::Changes }.new }
describe '.audit_changes' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Audit::Details do
RSpec.describe Audit::Details do
let(:user) { create(:user) }
describe '.humanize' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::Filter::CrossProjectIssuableInformationFilter do
RSpec.describe Banzai::Filter::CrossProjectIssuableInformationFilter do
include ActionView::Helpers::UrlHelper
include FilterSpecHelper
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::Filter::EpicReferenceFilter do
RSpec.describe Banzai::Filter::EpicReferenceFilter do
include FilterSpecHelper
let(:urls) { Gitlab::Routing.url_helpers }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::Filter::InlineAlertMetricsFilter do
RSpec.describe Banzai::Filter::InlineAlertMetricsFilter do
include FilterSpecHelper
let(:params) { ['foo', 'bar', 12] }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::Filter::InlineClusterMetricsFilter do
RSpec.describe Banzai::Filter::InlineClusterMetricsFilter do
include FilterSpecHelper
let!(:cluster) { create(:cluster) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::Filter::InlineMetricsRedactorFilter do
RSpec.describe Banzai::Filter::InlineMetricsRedactorFilter do
include FilterSpecHelper
let_it_be(:project) { create(:project) }
......
# frozen_string_literal: true
require 'spec_helper'
describe Banzai::Filter::IssuableStateFilter do
RSpec.describe Banzai::Filter::IssuableStateFilter do
include ActionView::Helpers::UrlHelper
include FilterSpecHelper
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::Filter::IterationReferenceFilter do
RSpec.describe Banzai::Filter::IterationReferenceFilter do
include FilterSpecHelper
let(:parent_group) { create(:group, :public) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::Filter::LabelReferenceFilter do
RSpec.describe Banzai::Filter::LabelReferenceFilter do
include FilterSpecHelper
let(:project) { create(:project, :public, name: 'sample-project') }
......
# frozen_string_literal: true
require 'spec_helper'
describe Banzai::IssuableExtractor do
RSpec.describe Banzai::IssuableExtractor do
it 'returns an instance of an epic for the node with reference' do
epic = create(:epic)
user = create(:user)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::ReferenceParser::EpicParser do
RSpec.describe Banzai::ReferenceParser::EpicParser do
include ReferenceParserHelpers
def link(epic_id)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Banzai::ReferenceParser::IterationParser do
RSpec.describe Banzai::ReferenceParser::IterationParser do
include ReferenceParserHelpers
let(:project) { create(:project, :public) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Constraints::JiraEncodedUrlConstrainer do
RSpec.describe Constraints::JiraEncodedUrlConstrainer do
let(:namespace_id) { 'group' }
let(:project_id) { 'project' }
let(:path) { "/#{namespace_id}/#{project_id}" }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ContainerRegistry::Client do
RSpec.describe ContainerRegistry::Client do
let(:token) { '12345' }
let(:options) { { token: token } }
let(:client) { described_class.new("http://registry", options) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::API::Entities::Analytics::CodeReview::MergeRequest do
RSpec.describe EE::API::Entities::Analytics::CodeReview::MergeRequest do
subject(:entity_representation) { described_class.new(merge_request).as_json }
let(:merge_request) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::API::Entities::Analytics::GroupActivity do
RSpec.describe EE::API::Entities::Analytics::GroupActivity do
let(:count) { 10 }
shared_examples 'exposes count' do |count_type, entity|
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::API::Entities::GeoNodeStatus do
RSpec.describe EE::API::Entities::GeoNodeStatus do
include ::EE::GeoHelpers
let(:geo_node_status) { build(:geo_node_status) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Entities::Member do
RSpec.describe API::Entities::Member do
subject(:entity_representation) { described_class.new(member).as_json }
let(:member) { build_stubbed(:group_member) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::API::Entities::Nuget::Metadatum do
RSpec.describe EE::API::Entities::Nuget::Metadatum do
let(:metadatum) do
{
project_url: 'http://sandbox.com/project',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::API::Entities::Nuget::PackageMetadataCatalogEntry do
RSpec.describe EE::API::Entities::Nuget::PackageMetadataCatalogEntry do
let(:entry) do
{
json_url: 'http://sandbox.com/json/package',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::API::Entities::Nuget::SearchResult do
RSpec.describe EE::API::Entities::Nuget::SearchResult do
let(:search_result) do
{
type: 'Package',
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Entities::Scim::Conflict do
RSpec.describe ::EE::API::Entities::Scim::Conflict do
let(:params) { { detail: 'error' } }
let(:entity) do
described_class.new(params)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Entities::Scim::Emails do
RSpec.describe ::EE::API::Entities::Scim::Emails do
let(:user) { build(:user) }
let(:identity) { build(:group_saml_identity, user: user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Entities::Scim::Error do
RSpec.describe ::EE::API::Entities::Scim::Error do
let(:params) { { detail: 'error' } }
let(:entity) do
described_class.new(params)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Entities::Scim::NotFound do
RSpec.describe ::EE::API::Entities::Scim::NotFound do
let(:entity) do
described_class.new({})
end
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Entities::Scim::UserName do
RSpec.describe ::EE::API::Entities::Scim::UserName do
let(:user) { build(:user) }
subject { described_class.new(user).as_json }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Entities::Scim::User do
RSpec.describe ::EE::API::Entities::Scim::User do
let(:user) { build(:user) }
let(:identity) { build(:group_saml_identity, user: user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Entities::Scim::Users do
RSpec.describe ::EE::API::Entities::Scim::Users do
let(:user) { build(:user) }
let(:identity) { build(:group_saml_identity, user: user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Entities::VulnerabilityExport do
RSpec.describe ::EE::API::Entities::VulnerabilityExport do
let(:vulnerability_export) { create(:vulnerability_export, :finished, :csv, :with_csv_file) }
let(:entity) { described_class.new(vulnerability_export) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Entities::Vulnerability do
RSpec.describe ::EE::API::Entities::Vulnerability do
let_it_be(:project) { create(:project, :with_vulnerability) }
let(:vulnerability) { project.vulnerabilities.first }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe API::Helpers::IssuesHelpers do
RSpec.describe API::Helpers::IssuesHelpers do
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, group: group) }
let_it_be(:user) { create(:user) }
......
# frozen_string_literal: true
require 'spec_helper'
describe EE::API::Helpers::MembersHelpers do
RSpec.describe EE::API::Helpers::MembersHelpers do
subject(:members_helpers) { Class.new.include(described_class).new }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'NotesHelpers' do
RSpec.describe 'NotesHelpers' do
describe '#find_noteable' do
let!(:group) { create(:group, :public) }
let!(:other_group) { create(:group, :public) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::API::Helpers::Runner do
RSpec.describe EE::API::Helpers::Runner do
let(:helper) { Class.new { include API::Helpers::Runner }.new }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::EE::API::Helpers::ScimPagination do
RSpec.describe ::EE::API::Helpers::ScimPagination do
let(:query) { {} }
let(:pagination_class) { Struct.new(:params).include(described_class) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::API::Helpers do
RSpec.describe EE::API::Helpers do
include Rack::Test::Methods
let(:helper) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Audit::GroupChangesAuditor do
RSpec.describe EE::Audit::GroupChangesAuditor do
describe '.audit_changes' do
let!(:user) { create(:user) }
let!(:group) { create(:group, visibility_level: 0) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Audit::ProjectChangesAuditor do
RSpec.describe EE::Audit::ProjectChangesAuditor do
describe '.audit_changes' do
let(:user) { create(:user) }
let(:project) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Audit::ProjectFeatureChangesAuditor do
RSpec.describe EE::Audit::ProjectFeatureChangesAuditor do
describe '#execute' do
let!(:user) { create(:user) }
let!(:project) { create(:project, :pages_enabled, visibility_level: 0) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EventFilter do
RSpec.describe EventFilter do
describe '#apply_filter' do
let_it_be(:group) { create(:group, :public) }
let_it_be(:project) { create(:project, :public) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Feature do
RSpec.describe Feature do
include EE::GeoHelpers
describe '.enable' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Analytics::CycleAnalytics::BaseQueryBuilder do
RSpec.describe Gitlab::Analytics::CycleAnalytics::BaseQueryBuilder do
let_it_be(:group) { create(:group) }
let_it_be(:subgroup) { create(:group, parent: group) }
let_it_be(:project_in_group) { create(:project, :repository, group: group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ApplicationContext do
RSpec.describe Gitlab::ApplicationContext do
describe '#to_lazy_hash' do
let(:user) { build(:user) }
let(:project) { build(:project) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Auth::Ldap::AccessLevels do
RSpec.describe EE::Gitlab::Auth::Ldap::AccessLevels do
describe '#set' do
let(:access_levels) { described_class.new }
let(:dns) do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Auth::Ldap::Group do
RSpec.describe EE::Gitlab::Auth::Ldap::Group do
include LdapHelpers
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Auth::Ldap::Sync::AdminUsers do
RSpec.describe EE::Gitlab::Auth::Ldap::Sync::AdminUsers do
include LdapHelpers
let(:adapter) { ldap_adapter }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Auth::Ldap::Sync::ExternalUsers do
RSpec.describe EE::Gitlab::Auth::Ldap::Sync::ExternalUsers do
include LdapHelpers
describe '#update_permissions' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Auth::Ldap::Sync::Group do
RSpec.describe EE::Gitlab::Auth::Ldap::Sync::Group do
include LdapHelpers
let(:adapter) { ldap_adapter }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Auth::Ldap::Sync::Groups do
RSpec.describe EE::Gitlab::Auth::Ldap::Sync::Groups do
include LdapHelpers
let(:adapter) { ldap_adapter }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
require 'net/ldap/dn'
describe EE::Gitlab::Auth::Ldap::Sync::Proxy do
RSpec.describe EE::Gitlab::Auth::Ldap::Sync::Proxy do
include LdapHelpers
let(:adapter) { ldap_adapter }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
# rubocop:disable RSpec/FactoriesInMigrationSpecs
describe Gitlab::BackgroundMigration::BackfillVersionDataFromGitaly do
RSpec.describe Gitlab::BackgroundMigration::BackfillVersionDataFromGitaly do
let(:issue) { create(:issue) }
def perform_worker
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::MigrateApproverToApprovalRulesCheckProgress do
RSpec.describe Gitlab::BackgroundMigration::MigrateApproverToApprovalRulesCheckProgress do
context 'when there is MigrateApproverToApprovalRulesInBatch jobs' do
it 'reschedules check' do
allow(Gitlab::BackgroundMigration).to receive(:exists?).with('MigrateApproverToApprovalRulesInBatch').and_return(true)
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
# rubocop:disable RSpec/FactoriesInMigrationSpecs
describe Gitlab::BackgroundMigration::MigrateApproverToApprovalRulesInBatch do
RSpec.describe Gitlab::BackgroundMigration::MigrateApproverToApprovalRulesInBatch do
context 'when there is no more MigrateApproverToApprovalRules jobs' do
let(:job) { double(:job) }
let(:project) { create(:project) }
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
# rubocop:disable RSpec/FactoriesInMigrationSpecs
describe Gitlab::BackgroundMigration::MigrateApproverToApprovalRules do
RSpec.describe Gitlab::BackgroundMigration::MigrateApproverToApprovalRules do
def create_skip_sync(*args)
build(*args) do |record|
allow(record).to receive(:schedule_approval_migration)
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
# rubocop: disable RSpec/FactoriesInMigrationSpecs
describe Gitlab::BackgroundMigration::MigrateSecurityScans, schema: 20200220180944 do
RSpec.describe Gitlab::BackgroundMigration::MigrateSecurityScans, schema: 20200220180944 do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:builds) { table(:ci_builds) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::MoveEpicIssuesAfterEpics, schema: 20190926180443 do
RSpec.describe Gitlab::BackgroundMigration::MoveEpicIssuesAfterEpics, schema: 20190926180443 do
let(:users) { table(:users) }
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::PopulateAnyApprovalRuleForMergeRequests, schema: 2019_09_05_091831 do
RSpec.describe Gitlab::BackgroundMigration::PopulateAnyApprovalRuleForMergeRequests, schema: 2019_09_05_091831 do
let(:namespaces) { table(:namespaces) }
let(:namespace) { namespaces.create(name: 'gitlab', path: 'gitlab-org') }
let(:projects) { table(:projects) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::PopulateAnyApprovalRuleForProjects, schema: 2019_09_05_091812 do
RSpec.describe Gitlab::BackgroundMigration::PopulateAnyApprovalRuleForProjects, schema: 2019_09_05_091812 do
let(:namespaces) { table(:namespaces) }
let(:namespace) { namespaces.create(name: 'gitlab', path: 'gitlab-org') }
let(:projects) { table(:projects) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::PruneOrphanedGeoEvents, geo: false, schema: 2020_01_02_170221 do
RSpec.describe Gitlab::BackgroundMigration::PruneOrphanedGeoEvents, geo: false, schema: 2020_01_02_170221 do
let(:event_table_name) { 'geo_repository_updated_events' }
let(:geo_event_log) { table(:geo_event_log) }
let(:geo_updated_events) { table(event_table_name) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::RemoveUndefinedOccurrenceConfidenceLevel, :migration, schema: 20200506085748 do
RSpec.describe Gitlab::BackgroundMigration::RemoveUndefinedOccurrenceConfidenceLevel, :migration, schema: 20200506085748 do
let(:vulnerabilities) { table(:vulnerability_occurrences) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:scanners) { table(:vulnerability_scanners) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::RemoveUndefinedOccurrenceSeverityLevel, schema: 20200227140242 do
RSpec.describe Gitlab::BackgroundMigration::RemoveUndefinedOccurrenceSeverityLevel, schema: 20200227140242 do
let(:vulnerabilities) { table(:vulnerability_occurrences) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:scanners) { table(:vulnerability_scanners) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::RemoveUndefinedVulnerabilityConfidenceLevel, :migration, schema: 20200511092714 do
RSpec.describe Gitlab::BackgroundMigration::RemoveUndefinedVulnerabilityConfidenceLevel, :migration, schema: 20200511092714 do
let(:vulnerabilities) { table(:vulnerabilities) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:projects) { table(:projects) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::RemoveUndefinedVulnerabilitySeverityLevel, :migration, schema: 20200302142052 do
RSpec.describe Gitlab::BackgroundMigration::RemoveUndefinedVulnerabilitySeverityLevel, :migration, schema: 20200302142052 do
let(:vulnerabilities) { table(:vulnerabilities) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:projects) { table(:projects) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::UpdateVulnerabilitiesToDismissed, :migration, schema: 20200416111111 do
RSpec.describe Gitlab::BackgroundMigration::UpdateVulnerabilitiesToDismissed, :migration, schema: 20200416111111 do
let(:users) { table(:users) }
let(:projects) { table(:projects) }
let(:vulnerabilities) { table(:vulnerabilities) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::BackgroundMigration::UpdateVulnerabilityConfidence, schema: 20190909141517 do
RSpec.describe Gitlab::BackgroundMigration::UpdateVulnerabilityConfidence, schema: 20190909141517 do
let(:vulnerabilities) { table(:vulnerability_occurrences) }
let(:identifiers) { table(:vulnerability_identifiers) }
let(:scanners) { table(:vulnerability_scanners) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Checks::PushRuleCheck do
RSpec.describe EE::Gitlab::Checks::PushRuleCheck do
include_context 'push rules checks context'
let(:push_rule) { create(:push_rule, :commit_message) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Checks::PushRules::BranchCheck do
RSpec.describe EE::Gitlab::Checks::PushRules::BranchCheck do
include_context 'push rules checks context'
describe '#validate!' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Checks::PushRules::CommitCheck do
RSpec.describe EE::Gitlab::Checks::PushRules::CommitCheck do
include_context 'push rules checks context'
describe '#validate!' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Checks::PushRules::FileSizeCheck do
RSpec.describe EE::Gitlab::Checks::PushRules::FileSizeCheck do
include_context 'push rules checks context'
describe '#validate!' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Checks::PushRules::TagCheck do
RSpec.describe EE::Gitlab::Checks::PushRules::TagCheck do
include_context 'push rules checks context'
describe '#validate!' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config::Entry::Bridge do
RSpec.describe Gitlab::Ci::Config::Entry::Bridge do
subject { described_class.new(config, name: :my_bridge) }
describe '.matching?' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Gitlab::Ci::Config::Entry::Need do
RSpec.describe ::Gitlab::Ci::Config::Entry::Need do
subject(:need) { described_class.new(config) }
context 'with Bridge config' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe ::Gitlab::Ci::Config::Entry::Needs do
RSpec.describe ::Gitlab::Ci::Config::Entry::Needs do
subject(:needs) { described_class.new(config) }
before do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config do
RSpec.describe Gitlab::Ci::Config do
let(:template_name) { 'test_template' }
let(:template_repository) { create(:project, :custom_repo, files: { "gitlab-ci/#{template_name}.yml" => template_yml }) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Ci::Pipeline::Chain::Validate::Abilities do
RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::Abilities do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Ci::Pipeline::Quota::Activity do
RSpec.describe EE::Gitlab::Ci::Pipeline::Quota::Activity do
let_it_be(:namespace) { create(:namespace) }
let_it_be(:project, reload: true) { create(:project, namespace: namespace) }
let_it_be(:gold_plan, reload: true) { create(:gold_plan) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Ci::Pipeline::Quota::JobActivity do
RSpec.describe EE::Gitlab::Ci::Pipeline::Quota::JobActivity do
let_it_be(:namespace) { create(:namespace) }
let_it_be(:project, reload: true) { create(:project, namespace: namespace) }
let_it_be(:gold_plan, reload: true) { create(:gold_plan) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::Ci::Pipeline::Quota::Size do
RSpec.describe EE::Gitlab::Ci::Pipeline::Quota::Size do
let_it_be(:namespace) { create(:namespace) }
let_it_be(:gold_plan, reload: true) { create(:gold_plan) }
let_it_be(:project, reload: true) { create(:project, :repository, namespace: namespace) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe "CI YML Templates" do
RSpec.describe "CI YML Templates" do
using RSpec::Parameterized::TableSyntax
subject { Gitlab::Ci::YamlProcessor.new(content) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Cleanup::OrphanJobArtifactFilesBatch do
RSpec.describe Gitlab::Cleanup::OrphanJobArtifactFilesBatch do
include ::EE::GeoHelpers
let(:batch_size) { 10 }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Cleanup::OrphanJobArtifactFiles do
RSpec.describe Gitlab::Cleanup::OrphanJobArtifactFiles do
include ::EE::GeoHelpers
let(:null_logger) { Logger.new('/dev/null') }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Database do
RSpec.describe Gitlab::Database do
include ::EE::GeoHelpers
describe '.read_only?' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Elastic::Helper do
RSpec.describe Gitlab::Elastic::Helper do
subject(:helper) { described_class.default }
shared_context 'with a legacy index' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::EtagCaching::Router do
RSpec.describe Gitlab::EtagCaching::Router do
it 'matches epic notes endpoint' do
result = described_class.match(
'/groups/my-group/and-subgroup/-/epics/1/notes'
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::GitAccessDesign do
RSpec.describe Gitlab::GitAccessDesign do
include DesignManagementTestHelpers
using RSpec::Parameterized::TableSyntax
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::HookData::IssueBuilder do
RSpec.describe Gitlab::HookData::IssueBuilder do
let_it_be(:issue) { create(:issue) }
let(:builder) { described_class.new(issue) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportImportStrategy do
RSpec.describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportImportStrategy do
subject { described_class.new(export_into_project_id: project.id) }
describe 'validations' do
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ImportExport::Group::LegacyTreeRestorer do
RSpec.describe Gitlab::ImportExport::Group::LegacyTreeRestorer do
include ImportExport::CommonUtil
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ImportExport::Group::LegacyTreeSaver do
RSpec.describe Gitlab::ImportExport::Group::LegacyTreeSaver do
describe 'saves the group tree into a json object' do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ImportExport::Group::TreeRestorer do
RSpec.describe Gitlab::ImportExport::Group::TreeRestorer do
include ImportExport::CommonUtil
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::ImportExport::Group::TreeSaver do
RSpec.describe Gitlab::ImportExport::Group::TreeSaver do
describe 'saves the group tree into a json object' do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) }
......
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