Commit 2f8ab62e authored by Kerri Miller's avatar Kerri Miller

Merge branch 'rspec-empty-line-after-letitbe-ee-spec-services-analytics' into 'master'

Fix RSpec/EmptyLineAfterFinalLetItBe for ee/spec/services/analytics

See merge request gitlab-org/gitlab!58359
parents 779431cd 047cacbd
...@@ -620,15 +620,6 @@ RSpec/EmptyLineAfterFinalLetItBe: ...@@ -620,15 +620,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- ee/spec/serializers/vulnerabilities/feedback_entity_spec.rb - ee/spec/serializers/vulnerabilities/feedback_entity_spec.rb
- ee/spec/services/alert_management/extract_alert_payload_fields_service_spec.rb - ee/spec/services/alert_management/extract_alert_payload_fields_service_spec.rb
- ee/spec/services/alert_management/process_prometheus_alert_service_spec.rb - ee/spec/services/alert_management/process_prometheus_alert_service_spec.rb
- ee/spec/services/analytics/cycle_analytics/stages/delete_service_spec.rb
- ee/spec/services/analytics/cycle_analytics/stages/list_service_spec.rb
- ee/spec/services/analytics/cycle_analytics/stages/update_service_spec.rb
- ee/spec/services/analytics/cycle_analytics/value_streams/create_service_spec.rb
- ee/spec/services/analytics/deployments/frequency/aggregate_service_spec.rb
- ee/spec/services/analytics/devops_adoption/segments/bulk_delete_service_spec.rb
- ee/spec/services/analytics/devops_adoption/segments/create_service_spec.rb
- ee/spec/services/analytics/devops_adoption/segments/delete_service_spec.rb
- ee/spec/services/analytics/devops_adoption/segments/find_or_create_service_spec.rb
- ee/spec/services/approval_rules/create_service_spec.rb - ee/spec/services/approval_rules/create_service_spec.rb
- ee/spec/services/audit_event_service_spec.rb - ee/spec/services/audit_event_service_spec.rb
- ee/spec/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service_spec.rb - ee/spec/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service_spec.rb
......
---
title: Fix RSpec/EmptyLineAfterFinalLetItBe rubocop offenses in ee/spec/services/analytics
merge_request: 58359
author: Abdul Wadood @abdulwd
type: fixed
...@@ -7,6 +7,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::DeleteService do ...@@ -7,6 +7,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::DeleteService do
let_it_be(:value_stream, refind: true) { create(:cycle_analytics_group_value_stream, group: group) } let_it_be(:value_stream, refind: true) { create(:cycle_analytics_group_value_stream, group: group) }
let_it_be(:user, refind: true) { create(:user) } let_it_be(:user, refind: true) { create(:user) }
let_it_be(:stage, refind: true) { create(:cycle_analytics_group_stage, group: group, value_stream: value_stream) } let_it_be(:stage, refind: true) { create(:cycle_analytics_group_stage, group: group, value_stream: value_stream) }
let(:params) { { id: stage.id } } let(:params) { { id: stage.id } }
subject { described_class.new(parent: group, params: params, current_user: user).execute } subject { described_class.new(parent: group, params: params, current_user: user).execute }
......
...@@ -6,6 +6,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::ListService do ...@@ -6,6 +6,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::ListService do
let_it_be(:group, refind: true) { create(:group) } let_it_be(:group, refind: true) { create(:group) }
let_it_be(:value_stream, refind: true) { create(:cycle_analytics_group_value_stream, group: group) } let_it_be(:value_stream, refind: true) { create(:cycle_analytics_group_value_stream, group: group) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:stages) { subject.payload[:stages] } let(:stages) { subject.payload[:stages] }
subject { described_class.new(parent: group, current_user: user).execute } subject { described_class.new(parent: group, current_user: user).execute }
......
...@@ -6,6 +6,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::UpdateService do ...@@ -6,6 +6,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::UpdateService do
let_it_be(:group, refind: true) { create(:group) } let_it_be(:group, refind: true) { create(:group) }
let_it_be(:value_stream, refind: true) { create(:cycle_analytics_group_value_stream, group: group) } let_it_be(:value_stream, refind: true) { create(:cycle_analytics_group_value_stream, group: group) }
let_it_be(:user, refind: true) { create(:user) } let_it_be(:user, refind: true) { create(:user) }
let(:default_stages) { Gitlab::Analytics::CycleAnalytics::DefaultStages.all } let(:default_stages) { Gitlab::Analytics::CycleAnalytics::DefaultStages.all }
let(:params) { { value_stream: value_stream } } let(:params) { { value_stream: value_stream } }
let(:persisted_stages) { group.reload.cycle_analytics_stages.ordered } let(:persisted_stages) { group.reload.cycle_analytics_stages.ordered }
...@@ -98,6 +99,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::UpdateService do ...@@ -98,6 +99,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::UpdateService do
context 'when updating a custom stage' do context 'when updating a custom stage' do
let_it_be(:stage) { create(:cycle_analytics_group_stage, group: group, value_stream: value_stream) } let_it_be(:stage) { create(:cycle_analytics_group_stage, group: group, value_stream: value_stream) }
let(:params) { { id: stage.id, name: 'my new stage name', value_stream: value_stream } } let(:params) { { id: stage.id, name: 'my new stage name', value_stream: value_stream } }
it { expect(subject).to be_success } it { expect(subject).to be_success }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Analytics::CycleAnalytics::ValueStreams::CreateService do RSpec.describe Analytics::CycleAnalytics::ValueStreams::CreateService do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:group, refind: true) { create(:group) } let_it_be(:group, refind: true) { create(:group) }
let(:params) { {} } let(:params) { {} }
subject { described_class.new(group: group, params: params, current_user: user).execute } subject { described_class.new(group: group, params: params, current_user: user).execute }
......
...@@ -9,6 +9,7 @@ RSpec.describe Analytics::Deployments::Frequency::AggregateService do ...@@ -9,6 +9,7 @@ RSpec.describe Analytics::Deployments::Frequency::AggregateService do
let_it_be(:subgroup_project, refind: true) { create(:project, :repository, group: subgroup) } let_it_be(:subgroup_project, refind: true) { create(:project, :repository, group: subgroup) }
let_it_be(:developer) { create(:user) } let_it_be(:developer) { create(:user) }
let_it_be(:guest) { create(:user) } let_it_be(:guest) { create(:user) }
let(:container) { group_project } let(:container) { group_project }
let(:actor) { developer } let(:actor) { developer }
let(:service) { described_class.new(container: container, current_user: actor, params: params) } let(:service) { described_class.new(container: container, current_user: actor, params: params) }
......
...@@ -7,6 +7,7 @@ RSpec.describe Analytics::DevopsAdoption::Segments::BulkDeleteService do ...@@ -7,6 +7,7 @@ RSpec.describe Analytics::DevopsAdoption::Segments::BulkDeleteService do
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let_it_be(:admin) { create(:user, :admin) } let_it_be(:admin) { create(:user, :admin) }
let(:segment) { create(:devops_adoption_segment, namespace: group) } let(:segment) { create(:devops_adoption_segment, namespace: group) }
let(:segment2) { create(:devops_adoption_segment) } let(:segment2) { create(:devops_adoption_segment) }
let(:current_user) { admin } let(:current_user) { admin }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Analytics::DevopsAdoption::Segments::CreateService do RSpec.describe Analytics::DevopsAdoption::Segments::CreateService do
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let_it_be(:reporter) { create(:user).tap { |u| group.add_reporter(u) } } let_it_be(:reporter) { create(:user).tap { |u| group.add_reporter(u) } }
let(:current_user) { reporter } let(:current_user) { reporter }
let(:params) { { namespace: group } } let(:params) { { namespace: group } }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Analytics::DevopsAdoption::Segments::DeleteService do RSpec.describe Analytics::DevopsAdoption::Segments::DeleteService do
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let_it_be(:reporter) { create(:user).tap { |u| group.add_reporter(u) } } let_it_be(:reporter) { create(:user).tap { |u| group.add_reporter(u) } }
let(:segment) { create(:devops_adoption_segment, namespace: group) } let(:segment) { create(:devops_adoption_segment, namespace: group) }
let(:current_user) { reporter } let(:current_user) { reporter }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Analytics::DevopsAdoption::Segments::FindOrCreateService do RSpec.describe Analytics::DevopsAdoption::Segments::FindOrCreateService do
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
let_it_be(:reporter) { create(:user).tap { |u| group.add_reporter(u) } } let_it_be(:reporter) { create(:user).tap { |u| group.add_reporter(u) } }
let(:current_user) { reporter } let(:current_user) { reporter }
let(:params) { { namespace: group } } let(:params) { { namespace: group } }
......
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