Commit 41c4c289 authored by Arturo Herrero's avatar Arturo Herrero Committed by Stan Hu

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 3f472c95
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Users::UpdateService do RSpec.describe Users::UpdateService do
let(:user) { create(:user) } let(:user) { create(:user) }
describe '#execute' do describe '#execute' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe VulnerabilityFeedbackModule::UpdateService, '#execute' do RSpec.describe VulnerabilityFeedbackModule::UpdateService, '#execute' do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, :public, :repository, namespace: group) } let(:project) { create(:project, :public, :repository, namespace: group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Elastic::IndexProjectsByIdService do RSpec.describe Elastic::IndexProjectsByIdService do
describe '#execute' do describe '#execute' do
it 'schedules index workers' do it 'schedules index workers' do
Sidekiq::Testing.fake! do Sidekiq::Testing.fake! do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Elastic::IndexProjectsByRangeService do RSpec.describe Elastic::IndexProjectsByRangeService do
describe '#execute' do describe '#execute' do
context 'when without project' do context 'when without project' do
it 'does not err' do it 'does not err' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Elastic::IndexProjectsService do RSpec.describe Elastic::IndexProjectsService do
describe '#execute' do describe '#execute' do
context 'when elasticsearch_limit_indexing? is true' do context 'when elasticsearch_limit_indexing? is true' do
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Elastic::IndexRecordService, :elastic do RSpec.describe Elastic::IndexRecordService, :elastic do
subject { described_class.new } subject { described_class.new }
# Create admin user and search globally to avoid dealing with permissions in # Create admin user and search globally to avoid dealing with permissions in
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Elastic::IndexingControlService, :clean_gitlab_redis_shared_state do RSpec.describe Elastic::IndexingControlService, :clean_gitlab_redis_shared_state do
let(:worker_class) do let(:worker_class) do
Class.new do Class.new do
def self.name def self.name
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Elastic::MetricsUpdateService, :prometheus do RSpec.describe Elastic::MetricsUpdateService, :prometheus do
subject { described_class.new } subject { described_class.new }
before do before do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Elastic::ProcessBookkeepingService, :clean_gitlab_redis_shared_state do RSpec.describe Elastic::ProcessBookkeepingService, :clean_gitlab_redis_shared_state do
around do |example| around do |example|
described_class.with_redis do |redis| described_class.with_redis do |redis|
@redis = redis @redis = redis
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Emails::CreateService do RSpec.describe Emails::CreateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:opts) { { email: 'new@email.com', user: user } } let(:opts) { { email: 'new@email.com', user: user } }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Emails::DestroyService do RSpec.describe Emails::DestroyService do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:email) { create(:email, user: user) } let!(:email) { create(:email, user: user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EpicIssues::CreateService do RSpec.describe EpicIssues::CreateService do
describe '#execute' do describe '#execute' do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:epic) { create(:epic, group: group) } let(:epic) { create(:epic, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EpicIssues::DestroyService do RSpec.describe EpicIssues::DestroyService do
describe '#execute' do describe '#execute' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EpicIssues::ListService do RSpec.describe EpicIssues::ListService do
let(:user) { create :user } let(:user) { create :user }
let(:group) { create(:group, :private) } let(:group) { create(:group, :private) }
let(:project) { create(:project_empty_repo, group: group) } let(:project) { create(:project_empty_repo, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EpicIssues::UpdateService do RSpec.describe EpicIssues::UpdateService do
describe '#execute' do describe '#execute' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EpicLinks::CreateService do RSpec.describe EpicLinks::CreateService do
describe '#execute' do describe '#execute' do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EpicLinks::DestroyService do RSpec.describe EpicLinks::DestroyService do
describe '#execute' do describe '#execute' do
let(:group) { create(:group) } let(:group) { create(:group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EpicLinks::ListService do RSpec.describe EpicLinks::ListService do
let(:user) { create :user } let(:user) { create :user }
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
let(:parent_epic) { create(:epic, group: group) } let(:parent_epic) { create(:epic, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe EpicLinks::UpdateService do RSpec.describe EpicLinks::UpdateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:parent_epic) { create(:epic, group: group) } let(:parent_epic) { create(:epic, group: group) }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Epics::CloseService do RSpec.describe Epics::CloseService do
let(:group) { create(:group, :internal) } let(:group) { create(:group, :internal) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:epic) { create(:epic, group: group) } let(:epic) { create(:epic, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Epics::CreateService do RSpec.describe Epics::CreateService do
let_it_be(:group) { create(:group, :internal)} let_it_be(:group) { create(:group, :internal)}
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:parent_epic) { create(:epic, group: group) } let_it_be(:parent_epic) { create(:epic, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Epics::DescendantCountService do RSpec.describe Epics::DescendantCountService do
let_it_be(:group) { create(:group, :public)} let_it_be(:group) { create(:group, :public)}
let_it_be(:subgroup) { create(:group, :private, parent: group)} let_it_be(:subgroup) { create(:group, :private, parent: group)}
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Epics::IssuePromoteService do RSpec.describe Epics::IssuePromoteService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, group: group) } let(:project) { create(:project, group: group) }
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Epics::ReopenService do RSpec.describe Epics::ReopenService do
let(:group) { create(:group, :internal) } let(:group) { create(:group, :internal) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:epic) { create(:epic, group: group, state: :closed, closed_at: Date.today, closed_by: user) } let(:epic) { create(:epic, group: group, state: :closed, closed_at: Date.today, closed_by: user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Epics::TreeReorderService do RSpec.describe Epics::TreeReorderService do
describe '#execute' do describe '#execute' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Epics::UpdateDatesService do RSpec.describe Epics::UpdateDatesService do
let(:group) { create(:group, :internal) } let(:group) { create(:group, :internal) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, group: group) } let(:project) { create(:project, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Epics::UpdateService do RSpec.describe Epics::UpdateService do
let(:group) { create(:group, :internal) } let(:group) { create(:group, :internal) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:epic) { create(:epic, group: group) } let(:epic) { create(:epic, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe FeatureFlags::CreateService do RSpec.describe FeatureFlags::CreateService do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:developer) { create(:user) } let(:developer) { create(:user) }
let(:reporter) { create(:user) } let(:reporter) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe FeatureFlags::DestroyService do RSpec.describe FeatureFlags::DestroyService do
include FeatureFlagHelpers include FeatureFlagHelpers
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe FeatureFlags::DisableService do RSpec.describe FeatureFlags::DisableService do
include FeatureFlagHelpers include FeatureFlagHelpers
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe FeatureFlags::EnableService do RSpec.describe FeatureFlags::EnableService do
include FeatureFlagHelpers include FeatureFlagHelpers
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe FeatureFlags::UpdateService do RSpec.describe FeatureFlags::UpdateService do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:developer) { create(:user) } let(:developer) { create(:user) }
let(:reporter) { create(:user) } let(:reporter) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe FetchSubscriptionPlansService do RSpec.describe FetchSubscriptionPlansService do
describe '#execute' do describe '#execute' do
let(:endpoint_url) { 'https://customers.gitlab.com/gitlab_plans' } let(:endpoint_url) { 'https://customers.gitlab.com/gitlab_plans' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::BaseFileService do RSpec.describe Geo::BaseFileService do
subject { described_class.new('file', 8) } subject { described_class.new('file', 8) }
describe '#execute' do describe '#execute' do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require "spec_helper" require "spec_helper"
describe Geo::BlobDownloadService do RSpec.describe Geo::BlobDownloadService do
include ::EE::GeoHelpers include ::EE::GeoHelpers
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::BlobUploadService do RSpec.describe Geo::BlobUploadService do
let(:package_file) { create(:package_file, :npm) } let(:package_file) { create(:package_file, :npm) }
subject { described_class.new(replicable_name: 'package_file', replicable_id: package_file.id, decoded_params: {}) } subject { described_class.new(replicable_name: 'package_file', replicable_id: package_file.id, decoded_params: {}) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::BlobVerificationSecondaryService, :geo do RSpec.describe Geo::BlobVerificationSecondaryService, :geo do
include ::EE::GeoHelpers include ::EE::GeoHelpers
let(:secondary) { create(:geo_node) } let(:secondary) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::CacheInvalidationEventStore do RSpec.describe Geo::CacheInvalidationEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:secondary_node) { create(:geo_node) } let_it_be(:secondary_node) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::ContainerRepositorySyncService, :geo do RSpec.describe Geo::ContainerRepositorySyncService, :geo do
include ::EE::GeoHelpers include ::EE::GeoHelpers
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::ContainerRepositorySync, :geo do RSpec.describe Geo::ContainerRepositorySync, :geo do
let(:group) { create(:group, name: 'group') } let(:group) { create(:group, name: 'group') }
let(:project) { create(:project, path: 'test', group: group) } let(:project) { create(:project, path: 'test', group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::ContainerRepositoryUpdatedEventStore do RSpec.describe Geo::ContainerRepositoryUpdatedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:secondary_node) { create(:geo_node) } let_it_be(:secondary_node) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::DesignRepositorySyncService do RSpec.describe Geo::DesignRepositorySyncService do
include ::EE::GeoHelpers include ::EE::GeoHelpers
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::EventService do RSpec.describe Geo::EventService do
include ::EE::GeoHelpers include ::EE::GeoHelpers
let_it_be(:primary) { create(:geo_node, :primary) } let_it_be(:primary) { create(:geo_node, :primary) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::FileDownloadService do RSpec.describe Geo::FileDownloadService do
include ::EE::GeoHelpers include ::EE::GeoHelpers
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::FileRegistryRemovalService, :geo do RSpec.describe Geo::FileRegistryRemovalService, :geo do
include ::EE::GeoHelpers include ::EE::GeoHelpers
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::FileUploadService do RSpec.describe Geo::FileUploadService do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:node) { create(:geo_node, :primary) } let_it_be(:node) { create(:geo_node, :primary) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::FilesExpireService, :geo, :geo_fdw do RSpec.describe Geo::FilesExpireService, :geo, :geo_fdw do
let(:project) { create(:project, :legacy_storage) } let(:project) { create(:project, :legacy_storage) }
let!(:old_full_path) { project.full_path } let!(:old_full_path) { project.full_path }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::HashedStorageAttachmentsEventStore do RSpec.describe Geo::HashedStorageAttachmentsEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:secondary_node) { create(:geo_node) } let_it_be(:secondary_node) { create(:geo_node) }
......
...@@ -6,7 +6,7 @@ def base_path(storage) ...@@ -6,7 +6,7 @@ def base_path(storage)
File.join(FileUploader.root, storage.disk_path) File.join(FileUploader.root, storage.disk_path)
end end
describe Geo::HashedStorageAttachmentsMigrationService do RSpec.describe Geo::HashedStorageAttachmentsMigrationService do
let!(:project) { create(:project, :legacy_storage) } let!(:project) { create(:project, :legacy_storage) }
let(:legacy_storage) { Storage::LegacyProject.new(project) } let(:legacy_storage) { Storage::LegacyProject.new(project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::HashedStorageMigratedEventStore do RSpec.describe Geo::HashedStorageMigratedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:secondary_node) { create(:geo_node) } let_it_be(:secondary_node) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::HashedStorageMigrationService do RSpec.describe Geo::HashedStorageMigrationService do
let!(:project) { create(:project, :repository, :legacy_storage) } let!(:project) { create(:project, :repository, :legacy_storage) }
let(:old_path) { project.full_path } let(:old_path) { project.full_path }
let(:new_path) { "#{old_path}+renamed" } let(:new_path) { "#{old_path}+renamed" }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::JobArtifactDeletedEventStore do RSpec.describe Geo::JobArtifactDeletedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:secondary_node) { create(:geo_node) } let_it_be(:secondary_node) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::LfsObjectDeletedEventStore do RSpec.describe Geo::LfsObjectDeletedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:secondary_node) { create(:geo_node) } let_it_be(:secondary_node) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::MetricsUpdateService, :geo, :prometheus do RSpec.describe Geo::MetricsUpdateService, :geo, :prometheus do
include ::EE::GeoHelpers include ::EE::GeoHelpers
let_it_be(:primary) { create(:geo_node, :primary) } let_it_be(:primary) { create(:geo_node, :primary) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::MoveRepositoryService, :geo do RSpec.describe Geo::MoveRepositoryService, :geo do
describe '#execute' do describe '#execute' do
let(:project) { create(:project, :repository, :wiki_repo, :legacy_storage) } let(:project) { create(:project, :repository, :wiki_repo, :legacy_storage) }
let(:old_path) { project.full_path } let(:old_path) { project.full_path }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::NodeCreateService do RSpec.describe Geo::NodeCreateService do
describe '#execute' do describe '#execute' do
it 'creates a new node with valid params' do it 'creates a new node with valid params' do
service = described_class.new(name: 'foo', url: 'http://example.com') service = described_class.new(name: 'foo', url: 'http://example.com')
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::NodeStatusPostService, :geo do RSpec.describe Geo::NodeStatusPostService, :geo do
include ::EE::GeoHelpers include ::EE::GeoHelpers
include ApiHelpers include ApiHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::NodeUpdateService do RSpec.describe Geo::NodeUpdateService do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:primary, reload: true) { create(:geo_node, :primary) } let_it_be(:primary, reload: true) { create(:geo_node, :primary) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::ProjectHousekeepingService do RSpec.describe Geo::ProjectHousekeepingService do
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
include ::EE::GeoHelpers include ::EE::GeoHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::PruneEventLogService do RSpec.describe Geo::PruneEventLogService do
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
let(:min_id) { :all } let(:min_id) { :all }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RegistryConsistencyService, :geo, :use_clean_rails_memory_store_caching do RSpec.describe Geo::RegistryConsistencyService, :geo, :use_clean_rails_memory_store_caching do
include EE::GeoHelpers include EE::GeoHelpers
let(:secondary) { create(:geo_node) } let(:secondary) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RenameRepositoryService do RSpec.describe Geo::RenameRepositoryService do
let(:project) { create(:project, :repository, :legacy_storage) } let(:project) { create(:project, :repository, :legacy_storage) }
let(:old_path) { project.full_path } let(:old_path) { project.full_path }
let(:new_path) { "#{old_path}+renamed" } let(:new_path) { "#{old_path}+renamed" }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoriesChangedEventStore do RSpec.describe Geo::RepositoriesChangedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let(:geo_node) { create(:geo_node) } let(:geo_node) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryBaseSyncService do RSpec.describe Geo::RepositoryBaseSyncService do
let(:project) { build('project') } let(:project) { build('project') }
subject { described_class.new(project) } subject { described_class.new(project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryCreatedEventStore do RSpec.describe Geo::RepositoryCreatedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryDeletedEventStore do RSpec.describe Geo::RepositoryDeletedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:project) { create(:project, path: 'bar') } let_it_be(:project) { create(:project, path: 'bar') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryDestroyService do RSpec.describe Geo::RepositoryDestroyService do
include ::EE::GeoHelpers include ::EE::GeoHelpers
let_it_be(:secondary) { create(:geo_node) } let_it_be(:secondary) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryRenamedEventStore do RSpec.describe Geo::RepositoryRenamedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:project) { create(:project, path: 'bar') } let_it_be(:project) { create(:project, path: 'bar') }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositorySyncService do RSpec.describe Geo::RepositorySyncService do
include ::EE::GeoHelpers include ::EE::GeoHelpers
include ExclusiveLeaseHelpers include ExclusiveLeaseHelpers
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryUpdatedEventStore do RSpec.describe Geo::RepositoryUpdatedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryUpdatedService do RSpec.describe Geo::RepositoryUpdatedService do
include ::EE::GeoHelpers include ::EE::GeoHelpers
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryVerificationPrimaryService do RSpec.describe Geo::RepositoryVerificationPrimaryService do
include EE::GeoHelpers include EE::GeoHelpers
let(:project) { create(:project) } let(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryVerificationReset, :geo do RSpec.describe Geo::RepositoryVerificationReset, :geo do
include ::EE::GeoHelpers include ::EE::GeoHelpers
let(:secondary) { create(:geo_node) } let(:secondary) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::RepositoryVerificationSecondaryService, :geo do RSpec.describe Geo::RepositoryVerificationSecondaryService, :geo do
include ::EE::GeoHelpers include ::EE::GeoHelpers
shared_examples 'verify checksums for repositories/wikis' do |type| shared_examples 'verify checksums for repositories/wikis' do |type|
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::ResetChecksumEventStore do RSpec.describe Geo::ResetChecksumEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Geo::UploadDeletedEventStore do RSpec.describe Geo::UploadDeletedEventStore do
include EE::GeoHelpers include EE::GeoHelpers
let_it_be(:secondary_node) { create(:geo_node) } let_it_be(:secondary_node) { create(:geo_node) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe GroupSaml::GroupManagedAccounts::CleanUpMembersService do RSpec.describe GroupSaml::GroupManagedAccounts::CleanUpMembersService do
subject(:service) { described_class.new(current_user, group) } subject(:service) { described_class.new(current_user, group) }
let(:group) { Group.new } let(:group) { Group.new }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe GroupSaml::GroupManagedAccounts::TransferMembershipService do RSpec.describe GroupSaml::GroupManagedAccounts::TransferMembershipService do
subject(:service) { described_class.new(current_user, group, session) } subject(:service) { described_class.new(current_user, group, session) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe GroupSaml::Identity::DestroyService do RSpec.describe GroupSaml::Identity::DestroyService do
let(:identity) { create(:group_saml_identity) } let(:identity) { create(:group_saml_identity) }
subject { described_class.new(identity) } subject { described_class.new(identity) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe GroupSaml::SamlProvider::CreateService do RSpec.describe GroupSaml::SamlProvider::CreateService do
let(:current_user) { build_stubbed(:user) } let(:current_user) { build_stubbed(:user) }
subject(:service) { described_class.new(current_user, group, params: params) } subject(:service) { described_class.new(current_user, group, params: params) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe GroupSaml::SamlProvider::UpdateService do RSpec.describe GroupSaml::SamlProvider::UpdateService do
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
subject(:service) { described_class.new(current_user, saml_provider, params: params) } subject(:service) { described_class.new(current_user, saml_provider, params: params) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe GroupSaml::SignUpService do RSpec.describe GroupSaml::SignUpService do
subject(:service) { described_class.new(new_user, group, session) } subject(:service) { described_class.new(new_user, group, session) }
let(:new_user) { build(:user) } let(:new_user) { build(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::AutocompleteService do RSpec.describe Groups::AutocompleteService do
let!(:group) { create(:group, :nested, :private, avatar: fixture_file_upload('spec/fixtures/dk.png')) } let!(:group) { create(:group, :nested, :private, avatar: fixture_file_upload('spec/fixtures/dk.png')) }
let!(:sub_group) { create(:group, :private, parent: group) } let!(:sub_group) { create(:group, :private, parent: group) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::CreateService, '#execute' do RSpec.describe Groups::CreateService, '#execute' do
let!(:user) { create :user } let!(:user) { create :user }
let!(:group_params) do let!(:group_params) do
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::DestroyService do RSpec.describe Groups::DestroyService do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:group) { create(:group) } let!(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::MarkForDeletionService do RSpec.describe Groups::MarkForDeletionService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::ParticipantsService do RSpec.describe Groups::ParticipantsService do
let(:group) { create(:group, avatar: fixture_file_upload('spec/fixtures/dk.png')) } let(:group) { create(:group, avatar: fixture_file_upload('spec/fixtures/dk.png')) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:epic) { create(:epic, group: group, author: user) } let(:epic) { create(:epic, group: group, author: user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::RestoreService do RSpec.describe Groups::RestoreService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) do let(:group) do
create(:group_with_deletion_schedule, create(:group_with_deletion_schedule,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::TransferService, '#execute' do RSpec.describe Groups::TransferService, '#execute' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group, :public) } let(:group) { create(:group, :public) }
let(:project) { create(:project, :public, namespace: group) } let(:project) { create(:project, :public, namespace: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Groups::UpdateService, '#execute' do RSpec.describe Groups::UpdateService, '#execute' do
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:group) { create(:group, :public) } let!(:group) { create(:group, :public) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe IssueLinks::CreateService do RSpec.describe IssueLinks::CreateService do
describe '#execute' do describe '#execute' do
let(:namespace) { create :namespace } let(:namespace) { create :namespace }
let(:project) { create :project, namespace: namespace } let(:project) { create :project, namespace: namespace }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe IssueLinks::DestroyService do RSpec.describe IssueLinks::DestroyService do
describe '#execute' do describe '#execute' do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe IssueLinks::ListService do RSpec.describe IssueLinks::ListService do
let(:user) { create :user } let(:user) { create :user }
let(:project) { create(:project_empty_repo, :private) } let(:project) { create(:project_empty_repo, :private) }
let(:issue) { create :issue, project: project } let(:issue) { create :issue, project: project }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::BuildService do RSpec.describe Issues::BuildService do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::DuplicateService do RSpec.describe Issues::DuplicateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:canonical_project) { create(:project) } let(:canonical_project) { create(:project) }
let(:duplicate_project) { create(:project) } let(:duplicate_project) { create(:project) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Issues::ExportCsvService do RSpec.describe Issues::ExportCsvService do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, :public, group: group) } let(:project) { create(:project, :public, group: group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Iterations::CreateService do RSpec.describe Iterations::CreateService do
shared_examples 'iterations create service' do shared_examples 'iterations create service' do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe JiraConnect::SyncService do RSpec.describe JiraConnect::SyncService do
describe '#execute' do describe '#execute' do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let(:branches) { [project.repository.find_branch('master')] } let(:branches) { [project.repository.find_branch('master')] }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe JiraConnectSubscriptions::CreateService do RSpec.describe JiraConnectSubscriptions::CreateService do
let(:installation) { create(:jira_connect_installation) } let(:installation) { create(:jira_connect_installation) }
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Keys::CreateService do RSpec.describe Keys::CreateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:params) { attributes_for(:key) } let(:params) { attributes_for(:key) }
......
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