Commit 9cb4a728 authored by Doug Stull's avatar Doug Stull

Resolve shared example newline offenses

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