Commit 0b00a5e1 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch '217338-resolve-empty-lines-between-shared-example-blocks' into 'master'

Resolves exclusions for RSpec/EmptyLineAfterSharedExample cop

Closes #217338

See merge request gitlab-org/gitlab!31944
parents dc2fbc70 9cb4a728
......@@ -208,17 +208,6 @@ Naming/RescuedExceptionsVariableName:
RSpec/ContextWording:
Enabled: false
RSpec/EmptyLineAfterSharedExample:
Exclude:
- 'ee/spec/mailers/notify_spec.rb'
- 'ee/spec/services/quick_actions/interpret_service_spec.rb'
- 'spec/controllers/repositories/git_http_controller_spec.rb'
- 'spec/finders/projects/serverless/functions_finder_spec.rb'
- 'spec/lib/gitlab/hook_data/issuable_builder_spec.rb'
- 'spec/lib/gitlab/legacy_github_import/importer_spec.rb'
- 'spec/models/event_spec.rb'
- 'spec/support/shared_examples/models/issuable_hook_data_shared_examples.rb'
# Offense count: 879
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
......
......@@ -173,6 +173,7 @@ describe Notify do
it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do
let(:model) { merge_request }
end
it_behaves_like 'it should show Gmail Actions View Merge request link'
it_behaves_like 'an unsubscribeable thread'
......@@ -236,6 +237,7 @@ describe Notify do
it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do
let(:model) { merge_request }
end
it_behaves_like 'it should show Gmail Actions View Merge request link'
it_behaves_like 'an unsubscribeable thread'
......@@ -305,6 +307,7 @@ describe Notify do
it_behaves_like 'an epic email starting a new thread with reply-by-email enabled' do
let(:model) { epic }
end
it_behaves_like 'it should show Gmail Actions View Epic link'
it_behaves_like 'an unsubscribeable thread'
it_behaves_like 'having group identification headers'
......@@ -362,6 +365,7 @@ describe Notify do
it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do
let(:model) { review.merge_request }
end
it_behaves_like 'it should show Gmail Actions View Merge request link'
it_behaves_like 'an unsubscribeable thread'
......
......@@ -524,6 +524,7 @@ describe QuickActions::InterpretService do
it_behaves_like 'epic relation is removed' do
let(:target) { epic }
end
it_behaves_like 'quick action is available', :remove_child_epic do
let(:target) { epic }
end
......@@ -537,6 +538,7 @@ describe QuickActions::InterpretService do
it_behaves_like 'epic relation is removed' do
let(:target) { epic }
end
it_behaves_like 'quick action is available', :remove_child_epic do
let(:target) { epic }
end
......
......@@ -169,6 +169,7 @@ describe Repositories::GitHttpController do
it_behaves_like 'info_refs behavior' do
let(:user) { project.owner }
end
it_behaves_like 'git_upload_pack behavior', true
it_behaves_like 'access checker class' do
let(:expected_class) { Gitlab::GitAccess }
......@@ -183,6 +184,7 @@ describe Repositories::GitHttpController do
it_behaves_like 'info_refs behavior' do
let(:user) { personal_snippet.author }
end
it_behaves_like 'git_upload_pack behavior', false
it_behaves_like 'access checker class' do
let(:expected_class) { Gitlab::GitAccessSnippet }
......@@ -197,6 +199,7 @@ describe Repositories::GitHttpController do
it_behaves_like 'info_refs behavior' do
let(:user) { project_snippet.author }
end
it_behaves_like 'git_upload_pack behavior', false
it_behaves_like 'access checker class' do
let(:expected_class) { Gitlab::GitAccessSnippet }
......
......@@ -48,6 +48,7 @@ describe Projects::Serverless::FunctionsFinder do
expect(function_finder.knative_installed).to be false
end
end
context 'when project level cluster is present and enabled' do
it_behaves_like 'before first deployment' do
let(:cluster) { create(:cluster, :project, :provided_by_gcp, enabled: true) }
......
......@@ -12,6 +12,7 @@ describe Gitlab::HookData::IssuableBuilder do
include_examples 'project hook data' do
let(:project) { builder.issuable.project }
end
include_examples 'deprecated repository hook data'
context "with a #{kind}" do
......
......@@ -294,6 +294,7 @@ describe Gitlab::LegacyGithubImport::Importer do
it_behaves_like 'Gitlab::LegacyGithubImport::Importer#execute' do
let(:expected_not_called) { [:import_releases, [:import_comments, :pull_requests]] }
end
it_behaves_like 'Gitlab::LegacyGithubImport::Importer#execute an error occurs'
it_behaves_like 'Gitlab::LegacyGithubImport unit-testing'
......
......@@ -300,6 +300,7 @@ describe Event do
include_examples 'visibility examples' do
let(:visibility) { visible_to_all }
end
include_examples 'visible to assignee and author', true
end
......@@ -309,6 +310,7 @@ describe Event do
include_examples 'visibility examples' do
let(:visibility) { visible_to_none_except(:member, :admin) }
end
include_examples 'visible to assignee and author', true
end
end
......@@ -320,6 +322,7 @@ describe Event do
include_examples 'visibility examples' do
let(:visibility) { visible_to_all }
end
include_examples 'visible to assignee and author', true
end
......@@ -329,6 +332,7 @@ describe Event do
include_examples 'visibility examples' do
let(:visibility) { visible_to_none_except(:member, :admin) }
end
include_examples 'visible to assignee and author', true
end
......@@ -429,6 +433,7 @@ describe Event do
end
# Normally, we'd expect the author of a comment to be able to view it.
# However, this doesn't seem to be the case for comments on snippets.
include_examples 'visible to author', false
end
......@@ -440,6 +445,7 @@ describe Event do
end
# Normally, we'd expect the author of a comment to be able to view it.
# However, this doesn't seem to be the case for comments on snippets.
include_examples 'visible to author', false
end
end
......@@ -450,6 +456,7 @@ describe Event do
include_examples 'visibility examples' do
let(:visibility) { visible_to_all }
end
include_examples 'visible to author', true
context 'on internal snippet' do
......@@ -466,6 +473,7 @@ describe Event do
include_examples 'visibility examples' do
let(:visibility) { visible_to_none_except(:admin) }
end
include_examples 'visible to author', true
end
end
......
......@@ -7,6 +7,7 @@ RSpec.shared_examples 'issuable hook data' do |kind|
include_examples 'project hook data' do
let(:project) { builder.issuable.project }
end
include_examples 'deprecated repository hook data'
context "with a #{kind}" do
......
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