diff options
author | Rémy Coutable <remy@rymai.me> | 2019-01-16 13:09:29 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-01-24 13:05:45 +0100 |
commit | 3a2abc1d50b419a353edb7f7cf68f3894dfdeeef (patch) | |
tree | 98fc575139997113d9074dde16a9689cb2ab8e31 /spec | |
parent | 16ab0050f6f1544eb717da34975f12861df37c9c (diff) | |
download | gitlab-ce-3a2abc1d50b419a353edb7f7cf68f3894dfdeeef.tar.gz |
Enable the Layout/ExtraSpacing cop56392-enable-the-layout-extraspacing-cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec')
147 files changed, 216 insertions, 216 deletions
diff --git a/spec/bin/changelog_spec.rb b/spec/bin/changelog_spec.rb index c59add88a82..b2c2fb810e8 100644 --- a/spec/bin/changelog_spec.rb +++ b/spec/bin/changelog_spec.rb @@ -80,7 +80,7 @@ describe 'bin/changelog' do end end - describe '.read_type' do + describe '.read_type' do let(:type) { '1' } it 'reads type from $stdin' do diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index c290acb72aa..c9e520317e8 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -423,7 +423,7 @@ describe ApplicationController do enforce_terms end - it 'redirects if the user did not accept the terms' do + it 'redirects if the user did not accept the terms' do get :index expect(response).to have_gitlab_http_status(302) diff --git a/spec/controllers/boards/issues_controller_spec.rb b/spec/controllers/boards/issues_controller_spec.rb index 725ea2bf1ab..5eb05f01b8d 100644 --- a/spec/controllers/boards/issues_controller_spec.rb +++ b/spec/controllers/boards/issues_controller_spec.rb @@ -229,7 +229,7 @@ describe Boards::IssuesController do post :create, params: { board_id: board.to_param, list_id: list.to_param, - issue: { title: title, project_id: project.id } + issue: { title: title, project_id: project.id } }, format: :json end diff --git a/spec/controllers/concerns/checks_collaboration_spec.rb b/spec/controllers/concerns/checks_collaboration_spec.rb index 1bd764290ae..d7f110e11f3 100644 --- a/spec/controllers/concerns/checks_collaboration_spec.rb +++ b/spec/controllers/concerns/checks_collaboration_spec.rb @@ -22,7 +22,7 @@ describe ChecksCollaboration do end end - it 'is true if the user can push to the project' do + it 'is true if the user can push to the project' do project.add_developer(user) expect(helper.can_collaborate_with_project?(project)).to be_truthy diff --git a/spec/controllers/groups/children_controller_spec.rb b/spec/controllers/groups/children_controller_spec.rb index 4d5bb1488ab..e1b97013408 100644 --- a/spec/controllers/groups/children_controller_spec.rb +++ b/spec/controllers/groups/children_controller_spec.rb @@ -110,7 +110,7 @@ describe Groups::ChildrenController do matched_project_1 = create(:project, :public, namespace: shared_subgroup, name: 'mobile-soc') l2_subgroup = create(:group, :public, parent: shared_subgroup, path: 'broadcom') - l3_subgroup = create(:group, :public, parent: l2_subgroup, path: 'wifi-group') + l3_subgroup = create(:group, :public, parent: l2_subgroup, path: 'wifi-group') matched_project_2 = create(:project, :public, namespace: l3_subgroup, name: 'mobile') get :index, params: { group_id: group.to_param, filter: 'mobile' }, format: :json @@ -289,7 +289,7 @@ describe Groups::ChildrenController do end context 'with subgroups and projects', :nested_groups do - let!(:first_page_subgroups) { create_list(:group, per_page, :public, parent: group) } + let!(:first_page_subgroups) { create_list(:group, per_page, :public, parent: group) } let!(:other_subgroup) { create(:group, :public, parent: group) } let!(:next_page_projects) { create_list(:project, per_page, :public, namespace: group) } @@ -306,7 +306,7 @@ describe Groups::ChildrenController do end context 'with a mixed first page' do - let!(:first_page_subgroups) { [create(:group, :public, parent: group)] } + let!(:first_page_subgroups) { [create(:group, :public, parent: group)] } let!(:first_page_projects) { create_list(:project, per_page, :public, namespace: group) } it 'correctly calculates the counts' do diff --git a/spec/controllers/profiles/avatars_controller_spec.rb b/spec/controllers/profiles/avatars_controller_spec.rb index 909709e1103..1ee0bf44e92 100644 --- a/spec/controllers/profiles/avatars_controller_spec.rb +++ b/spec/controllers/profiles/avatars_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Profiles::AvatarsController do - let(:user) { create(:user, avatar: fixture_file_upload("spec/fixtures/dk.png")) } + let(:user) { create(:user, avatar: fixture_file_upload("spec/fixtures/dk.png")) } before do sign_in(user) diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb index 26eec90da06..19cac47325c 100644 --- a/spec/controllers/projects/commit_controller_spec.rb +++ b/spec/controllers/projects/commit_controller_spec.rb @@ -5,7 +5,7 @@ describe Projects::CommitController do set(:user) { create(:user) } let(:commit) { project.commit("master") } let(:master_pickable_sha) { '7d3b0f7cff5f37573aea97cebfd5692ea1689924' } - let(:master_pickable_commit) { project.commit(master_pickable_sha) } + let(:master_pickable_commit) { project.commit(master_pickable_sha) } before do sign_in(user) diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 4451fd227e8..53d5bf752ef 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -253,8 +253,8 @@ describe Projects::MergeRequestsController do end context 'there is no source project' do - let(:project) { create(:project, :repository) } - let(:forked_project) { fork_project_with_submodules(project) } + let(:project) { create(:project, :repository) } + let(:forked_project) { fork_project_with_submodules(project) } let!(:merge_request) { create(:merge_request, source_project: forked_project, source_branch: 'add-submodule-version-bump', target_branch: 'master', target_project: project) } before do @@ -884,7 +884,7 @@ describe Projects::MergeRequestsController do end describe 'POST #rebase' do - let(:viewer) { user } + let(:viewer) { user } def post_rebase post :rebase, params: { namespace_id: project.namespace, project_id: project, id: merge_request } diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb index 0bb3ef76a3b..97e04a63d4a 100644 --- a/spec/controllers/projects/pipelines_controller_spec.rb +++ b/spec/controllers/projects/pipelines_controller_spec.rb @@ -50,7 +50,7 @@ describe Projects::PipelinesController do end end - context 'when using legacy stages', :request_store do + context 'when using legacy stages', :request_store do before do stub_feature_flags(ci_pipeline_persisted_stages: false) end diff --git a/spec/controllers/projects/serverless/functions_controller_spec.rb b/spec/controllers/projects/serverless/functions_controller_spec.rb index 87114d44bce..276cf340962 100644 --- a/spec/controllers/projects/serverless/functions_controller_spec.rb +++ b/spec/controllers/projects/serverless/functions_controller_spec.rb @@ -87,7 +87,7 @@ describe Projects::Serverless::FunctionsController do end it 'has data' do - get :index, params: params({ format: :json }) + get :index, params: params({ format: :json }) expect(response).to have_gitlab_http_status(200) diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index 9801ed19957..a1662658ade 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -456,7 +456,7 @@ describe ProjectsController do end context "when the project is forked" do - let(:project) { create(:project, :repository) } + let(:project) { create(:project, :repository) } let(:forked_project) { fork_project(project, nil, repository: true) } let(:merge_request) do create(:merge_request, diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb index c9b53336fd1..02a0cfe0272 100644 --- a/spec/controllers/search_controller_spec.rb +++ b/spec/controllers/search_controller_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe SearchController do - let(:user) { create(:user) } + let(:user) { create(:user) } before do sign_in(user) diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb index 5fbb71eca96..e52a5fe42f2 100644 --- a/spec/controllers/uploads_controller_spec.rb +++ b/spec/controllers/uploads_controller_spec.rb @@ -327,7 +327,7 @@ describe UploadsController do end context "when viewing a group avatar" do - let!(:group) { create(:group, avatar: fixture_file_upload("spec/fixtures/dk.png", "image/png")) } + let!(:group) { create(:group, avatar: fixture_file_upload("spec/fixtures/dk.png", "image/png")) } context "when the group is public" do context "when not signed in" do diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index bb3c0d6537d..0b3e67b4987 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -78,7 +78,7 @@ FactoryBot.define do trait :scheduled do schedulable status 'scheduled' - scheduled_at { 1.minute.since } + scheduled_at { 1.minute.since } end trait :expired_scheduled do diff --git a/spec/factories/group_members.rb b/spec/factories/group_members.rb index 12be63e5d92..077c6ddc5ae 100644 --- a/spec/factories/group_members.rb +++ b/spec/factories/group_members.rb @@ -8,7 +8,7 @@ FactoryBot.define do trait(:reporter) { access_level GroupMember::REPORTER } trait(:developer) { access_level GroupMember::DEVELOPER } trait(:maintainer) { access_level GroupMember::MAINTAINER } - trait(:owner) { access_level GroupMember::OWNER } + trait(:owner) { access_level GroupMember::OWNER } trait(:access_request) { requested_at { Time.now } } trait(:invited) do diff --git a/spec/features/admin/admin_abuse_reports_spec.rb b/spec/features/admin/admin_abuse_reports_spec.rb index d8fcdebfc6d..3ff1a66b0b2 100644 --- a/spec/features/admin/admin_abuse_reports_spec.rb +++ b/spec/features/admin/admin_abuse_reports_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Admin::AbuseReports", :js do +describe "Admin::AbuseReports", :js do let(:user) { create(:user) } context 'as an admin' do diff --git a/spec/features/admin/admin_projects_spec.rb b/spec/features/admin/admin_projects_spec.rb index d6ee256f5b5..2b6bfa40beb 100644 --- a/spec/features/admin/admin_projects_spec.rb +++ b/spec/features/admin/admin_projects_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Admin::Projects" do +describe "Admin::Projects" do include Select2Helper let(:user) { create :user } diff --git a/spec/features/atom/dashboard_issues_spec.rb b/spec/features/atom/dashboard_issues_spec.rb index 5fa1a26f1a6..dfa1c92ea49 100644 --- a/spec/features/atom/dashboard_issues_spec.rb +++ b/spec/features/atom/dashboard_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Dashboard Issues Feed" do +describe "Dashboard Issues Feed" do describe "GET /issues" do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/atom/dashboard_spec.rb b/spec/features/atom/dashboard_spec.rb index 86b3f88298f..947587220a9 100644 --- a/spec/features/atom/dashboard_spec.rb +++ b/spec/features/atom/dashboard_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Dashboard Feed" do +describe "Dashboard Feed" do describe "GET /" do let!(:user) { create(:user, name: "Jonh") } diff --git a/spec/features/atom/issues_spec.rb b/spec/features/atom/issues_spec.rb index ee3570a5b2b..714a9885caa 100644 --- a/spec/features/atom/issues_spec.rb +++ b/spec/features/atom/issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Issues Feed' do +describe 'Issues Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/atom/users_spec.rb b/spec/features/atom/users_spec.rb index 8d7df346abb..7de8bea5049 100644 --- a/spec/features/atom/users_spec.rb +++ b/spec/features/atom/users_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "User Feed" do +describe "User Feed" do describe "GET /" do let!(:user) { create(:user) } diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb index 08c27354bd2..ea69ec0319b 100644 --- a/spec/features/boards/boards_spec.rb +++ b/spec/features/boards/boards_spec.rb @@ -68,7 +68,7 @@ describe 'Issue Boards', :js do let(:bug) { create(:label, project: project, name: 'Bug') } let!(:backlog) { create(:label, project: project, name: 'Backlog') } let!(:closed) { create(:label, project: project, name: 'Closed') } - let!(:accepting) { create(:label, project: project, name: 'Accepting Merge Requests') } + let!(:accepting) { create(:label, project: project, name: 'Accepting Merge Requests') } let!(:a_plus) { create(:label, project: project, name: 'A+') } let!(:list1) { create(:list, board: board, label: planning, position: 0) } diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb index 32c75cae0a1..f4b2b9033ab 100644 --- a/spec/features/cycle_analytics_spec.rb +++ b/spec/features/cycle_analytics_spec.rb @@ -11,7 +11,7 @@ describe 'Cycle Analytics', :js do context 'as an allowed user' do context 'when project is new' do - before do + before do project.add_maintainer(user) sign_in(user) diff --git a/spec/features/dashboard/todos/todos_spec.rb b/spec/features/dashboard/todos/todos_spec.rb index 2284ee925a0..51f158d3045 100644 --- a/spec/features/dashboard/todos/todos_spec.rb +++ b/spec/features/dashboard/todos/todos_spec.rb @@ -112,7 +112,7 @@ describe 'Dashboard Todos' do end it 'shows issue assigned to yourself message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You assigned issue #{issue.to_reference(full: true)} to yourself") end end @@ -125,7 +125,7 @@ describe 'Dashboard Todos' do end it 'shows you added a todo message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You added a todo for issue #{issue.to_reference(full: true)}") expect(page).not_to have_content('to yourself') end @@ -139,7 +139,7 @@ describe 'Dashboard Todos' do end it 'shows you mentioned yourself message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You mentioned yourself on issue #{issue.to_reference(full: true)}") expect(page).not_to have_content('to yourself') end @@ -153,7 +153,7 @@ describe 'Dashboard Todos' do end it 'shows you directly addressed yourself message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You directly addressed yourself on issue #{issue.to_reference(full: true)}") expect(page).not_to have_content('to yourself') end @@ -169,7 +169,7 @@ describe 'Dashboard Todos' do end it 'shows you set yourself as an approver message' do - page.within('.js-todos-all') do + page.within('.js-todos-all') do expect(page).to have_content("You set yourself as an approver for merge request #{merge_request.to_reference(full: true)}") expect(page).not_to have_content('to yourself') end diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb index 00d81b26ce2..f3e573ccbc4 100644 --- a/spec/features/groups_spec.rb +++ b/spec/features/groups_spec.rb @@ -235,7 +235,7 @@ describe 'Group' do let!(:group) { create(:group) } let!(:nested_group) { create(:group, parent: group) } let!(:project) { create(:project, namespace: group) } - let!(:path) { group_path(group) } + let!(:path) { group_path(group) } it 'it renders projects and groups on the page' do visit path diff --git a/spec/features/ics/dashboard_issues_spec.rb b/spec/features/ics/dashboard_issues_spec.rb index ea714934ae7..debae0ea930 100644 --- a/spec/features/ics/dashboard_issues_spec.rb +++ b/spec/features/ics/dashboard_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Dashboard Issues Calendar Feed' do +describe 'Dashboard Issues Calendar Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/ics/group_issues_spec.rb b/spec/features/ics/group_issues_spec.rb index 24de5b4b7c6..4177c7f8704 100644 --- a/spec/features/ics/group_issues_spec.rb +++ b/spec/features/ics/group_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Group Issues Calendar Feed' do +describe 'Group Issues Calendar Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/ics/project_issues_spec.rb b/spec/features/ics/project_issues_spec.rb index 54143595e6b..0d9844be099 100644 --- a/spec/features/ics/project_issues_spec.rb +++ b/spec/features/ics/project_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Project Issues Calendar Feed' do +describe 'Project Issues Calendar Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/issues/resource_label_events_spec.rb b/spec/features/issues/resource_label_events_spec.rb index b0764db7751..3d380c183ec 100644 --- a/spec/features/issues/resource_label_events_spec.rb +++ b/spec/features/issues/resource_label_events_spec.rb @@ -6,7 +6,7 @@ describe 'List issue resource label events', :js do let(:user) { create(:user) } let(:project) { create(:project, :public) } let(:issue) { create(:issue, project: project, author: user) } - let!(:label) { create(:label, project: project, title: 'foo') } + let!(:label) { create(:label, project: project, title: 'foo') } let!(:user_status) { create(:user_status, user: user) } context 'when user displays the issue' do diff --git a/spec/features/labels_hierarchy_spec.rb b/spec/features/labels_hierarchy_spec.rb index 09904cb907f..7c31e67a7fa 100644 --- a/spec/features/labels_hierarchy_spec.rb +++ b/spec/features/labels_hierarchy_spec.rb @@ -179,7 +179,7 @@ describe 'Labels Hierarchy', :js, :nested_groups do end context 'on project board issue sidebar' do - let(:board) { create(:board, project: project_1) } + let(:board) { create(:board, project: project_1) } before do project_1.add_developer(user) @@ -195,7 +195,7 @@ describe 'Labels Hierarchy', :js, :nested_groups do end context 'on group board issue sidebar' do - let(:board) { create(:board, group: parent) } + let(:board) { create(:board, group: parent) } before do parent.add_developer(user) diff --git a/spec/features/merge_request/user_creates_mr_spec.rb b/spec/features/merge_request/user_creates_mr_spec.rb index 9d2a94a4a41..c169a68cd1c 100644 --- a/spec/features/merge_request/user_creates_mr_spec.rb +++ b/spec/features/merge_request/user_creates_mr_spec.rb @@ -30,7 +30,7 @@ describe 'Merge request > User creates MR' do end context 'source project', :js do - let(:user) { create(:user) } + let(:user) { create(:user) } let(:target_project) { create(:project, :public, :repository) } let(:source_project) { target_project } diff --git a/spec/features/merge_requests/user_mass_updates_spec.rb b/spec/features/merge_requests/user_mass_updates_spec.rb index cb6603d3f50..e535c7e5811 100644 --- a/spec/features/merge_requests/user_mass_updates_spec.rb +++ b/spec/features/merge_requests/user_mass_updates_spec.rb @@ -68,7 +68,7 @@ describe 'Merge requests > User mass updates', :js do end context 'milestone' do - let(:milestone) { create(:milestone, project: project) } + let(:milestone) { create(:milestone, project: project) } describe 'set milestone' do before do diff --git a/spec/features/milestone_spec.rb b/spec/features/milestone_spec.rb index a0673b12738..6e349395017 100644 --- a/spec/features/milestone_spec.rb +++ b/spec/features/milestone_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' describe 'Milestone' do let(:group) { create(:group, :public) } let(:project) { create(:project, :public, namespace: group) } - let(:user) { create(:user) } + let(:user) { create(:user) } before do create(:group_member, group: group, user: user) diff --git a/spec/features/projects/commit/builds_spec.rb b/spec/features/projects/commit/builds_spec.rb index caf69796d52..d72476f36a9 100644 --- a/spec/features/projects/commit/builds_spec.rb +++ b/spec/features/projects/commit/builds_spec.rb @@ -20,7 +20,7 @@ describe 'project commit pipelines', :js do visit pipelines_project_commit_path(project, project.commit.sha) page.within('.table-holder') do - expect(page).to have_content project.ci_pipelines[0].id # pipeline ids + expect(page).to have_content project.ci_pipelines[0].id # pipeline ids end end end diff --git a/spec/features/projects/commit/cherry_pick_spec.rb b/spec/features/projects/commit/cherry_pick_spec.rb index a61b614dbc8..acfb582dba9 100644 --- a/spec/features/projects/commit/cherry_pick_spec.rb +++ b/spec/features/projects/commit/cherry_pick_spec.rb @@ -4,8 +4,8 @@ describe 'Cherry-pick Commits' do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, :repository, namespace: group) } - let(:master_pickable_commit) { project.commit('7d3b0f7cff5f37573aea97cebfd5692ea1689924') } - let(:master_pickable_merge) { project.commit('e56497bb5f03a90a51293fc6d516788730953899') } + let(:master_pickable_commit) { project.commit('7d3b0f7cff5f37573aea97cebfd5692ea1689924') } + let(:master_pickable_merge) { project.commit('e56497bb5f03a90a51293fc6d516788730953899') } before do sign_in(user) diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index b75dee66592..ffa165c5440 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -465,7 +465,7 @@ describe 'Pipelines', :js do context 'with pagination' do before do allow(Ci::Pipeline).to receive(:default_per_page).and_return(1) - create(:ci_empty_pipeline, project: project) + create(:ci_empty_pipeline, project: project) end it 'should render pagination' do diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index eb70a3c41c1..4cb49ab02e2 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -5,7 +5,7 @@ describe 'Project' do include MobileHelpers describe 'creating from template' do - let(:user) { create(:user) } + let(:user) { create(:user) } let(:template) { Gitlab::ProjectTemplate.find(:rails) } before do @@ -170,7 +170,7 @@ describe 'Project' do describe 'showing information about source of a project fork' do let(:user) { create(:user) } - let(:base_project) { create(:project, :public, :repository) } + let(:base_project) { create(:project, :public, :repository) } let(:forked_project) { fork_project(base_project, user, repository: true) } before do diff --git a/spec/features/security/admin_access_spec.rb b/spec/features/security/admin_access_spec.rb index 3ca1303bda6..ff679034a36 100644 --- a/spec/features/security/admin_access_spec.rb +++ b/spec/features/security/admin_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Admin::Projects" do +describe "Admin::Projects" do include AccessMatchers describe "GET /admin/projects" do diff --git a/spec/features/security/dashboard_access_spec.rb b/spec/features/security/dashboard_access_spec.rb index 0c893e65d9c..07cddc92ac4 100644 --- a/spec/features/security/dashboard_access_spec.rb +++ b/spec/features/security/dashboard_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Dashboard access" do +describe "Dashboard access" do include AccessMatchers describe "GET /dashboard" do diff --git a/spec/features/security/profile_access_spec.rb b/spec/features/security/profile_access_spec.rb index 41eb7b26578..a198e65046f 100644 --- a/spec/features/security/profile_access_spec.rb +++ b/spec/features/security/profile_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Profile access" do +describe "Profile access" do include AccessMatchers describe "GET /profile/keys" do diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb index 001e6c10eb2..843dbcd5b4d 100644 --- a/spec/features/security/project/internal_access_spec.rb +++ b/spec/features/security/project/internal_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Internal Project Access" do +describe "Internal Project Access" do include AccessMatchers set(:project) { create(:project, :internal, :repository) } diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index c6618355eea..cf0837c1e67 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Private Project Access" do +describe "Private Project Access" do include AccessMatchers set(:project) { create(:project, :private, :repository, public_builds: false) } diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index 3717dc13f1e..7e1b735fd3d 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Public Project Access" do +describe "Public Project Access" do include AccessMatchers set(:project) { create(:project, :public, :repository) } diff --git a/spec/features/security/project/snippet/internal_access_spec.rb b/spec/features/security/project/snippet/internal_access_spec.rb index b87eb86b88b..0c58fdf2f12 100644 --- a/spec/features/security/project/snippet/internal_access_spec.rb +++ b/spec/features/security/project/snippet/internal_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Internal Project Snippets Access" do +describe "Internal Project Snippets Access" do include AccessMatchers let(:project) { create(:project, :internal) } diff --git a/spec/features/security/project/snippet/private_access_spec.rb b/spec/features/security/project/snippet/private_access_spec.rb index ead91d9a5fa..420f1938763 100644 --- a/spec/features/security/project/snippet/private_access_spec.rb +++ b/spec/features/security/project/snippet/private_access_spec.rb @@ -1,11 +1,11 @@ require 'spec_helper' -describe "Private Project Snippets Access" do +describe "Private Project Snippets Access" do include AccessMatchers let(:project) { create(:project, :private) } - let(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) } + let(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) } describe "GET /:project_path/snippets" do subject { project_snippets_path(project) } diff --git a/spec/features/security/project/snippet/public_access_spec.rb b/spec/features/security/project/snippet/public_access_spec.rb index 9bab3a474b8..6c75902c6e9 100644 --- a/spec/features/security/project/snippet/public_access_spec.rb +++ b/spec/features/security/project/snippet/public_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Public Project Snippets Access" do +describe "Public Project Snippets Access" do include AccessMatchers let(:project) { create(:project, :public) } diff --git a/spec/features/users/terms_spec.rb b/spec/features/users/terms_spec.rb index 5b2e7605c4d..84df1016594 100644 --- a/spec/features/users/terms_spec.rb +++ b/spec/features/users/terms_spec.rb @@ -76,7 +76,7 @@ describe 'Users > Terms' do project.add_developer(user) end - it 'redirects to terms and back to where the user was going' do + it 'redirects to terms and back to where the user was going' do visit project_path(project) enforce_terms diff --git a/spec/finders/groups_finder_spec.rb b/spec/finders/groups_finder_spec.rb index 16c0d418d98..367ca43bdfe 100644 --- a/spec/finders/groups_finder_spec.rb +++ b/spec/finders/groups_finder_spec.rb @@ -8,22 +8,22 @@ describe GroupsFinder do using RSpec::Parameterized::TableSyntax where(:user_type, :params, :results) do - nil | { all_available: true } | %i(public_group user_public_group) - nil | { all_available: false } | %i(public_group user_public_group) + nil | { all_available: true } | %i(public_group user_public_group) + nil | { all_available: false } | %i(public_group user_public_group) nil | {} | %i(public_group user_public_group) - :regular | { all_available: true } | %i(public_group internal_group user_public_group user_internal_group - user_private_group) - :regular | { all_available: false } | %i(user_public_group user_internal_group user_private_group) + :regular | { all_available: true } | %i(public_group internal_group user_public_group user_internal_group + user_private_group) + :regular | { all_available: false } | %i(user_public_group user_internal_group user_private_group) :regular | {} | %i(public_group internal_group user_public_group user_internal_group user_private_group) - :external | { all_available: true } | %i(public_group user_public_group user_internal_group user_private_group) - :external | { all_available: false } | %i(user_public_group user_internal_group user_private_group) + :external | { all_available: true } | %i(public_group user_public_group user_internal_group user_private_group) + :external | { all_available: false } | %i(user_public_group user_internal_group user_private_group) :external | {} | %i(public_group user_public_group user_internal_group user_private_group) - :admin | { all_available: true } | %i(public_group internal_group private_group user_public_group - user_internal_group user_private_group) - :admin | { all_available: false } | %i(user_public_group user_internal_group user_private_group) + :admin | { all_available: true } | %i(public_group internal_group private_group user_public_group + user_internal_group user_private_group) + :admin | { all_available: false } | %i(user_public_group user_internal_group user_private_group) :admin | {} | %i(public_group internal_group private_group user_public_group user_internal_group user_private_group) end diff --git a/spec/finders/merge_request_target_project_finder_spec.rb b/spec/finders/merge_request_target_project_finder_spec.rb index f302cf80ce8..d26a75179de 100644 --- a/spec/finders/merge_request_target_project_finder_spec.rb +++ b/spec/finders/merge_request_target_project_finder_spec.rb @@ -7,7 +7,7 @@ describe MergeRequestTargetProjectFinder do subject(:finder) { described_class.new(current_user: user, source_project: forked_project) } shared_examples 'finding related projects' do - it 'finds sibling projects and base project' do + it 'finds sibling projects and base project' do other_fork expect(finder.execute).to contain_exactly(base_project, other_fork, forked_project) diff --git a/spec/finders/notes_finder_spec.rb b/spec/finders/notes_finder_spec.rb index b51f1955ac4..0a685152cf9 100644 --- a/spec/finders/notes_finder_spec.rb +++ b/spec/finders/notes_finder_spec.rb @@ -121,7 +121,7 @@ describe NotesFinder do let(:note1) { create :note_on_commit, project: project } let(:note2) { create :note_on_commit, project: project } let(:commit) { note1.noteable } - let(:params) { { target_id: commit.id, target_type: 'commit', last_fetched_at: 1.hour.ago.to_i } } + let(:params) { { target_id: commit.id, target_type: 'commit', last_fetched_at: 1.hour.ago.to_i } } before do note1 diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb index 590e838f13e..ac866e49fcd 100644 --- a/spec/finders/projects_finder_spec.rb +++ b/spec/finders/projects_finder_spec.rb @@ -137,7 +137,7 @@ describe ProjectsFinder do end describe 'filter by trending' do - let!(:trending_project) { create(:trending_project, project: public_project) } + let!(:trending_project) { create(:trending_project, project: public_project) } let(:params) { { trending: true } } it { is_expected.to eq([public_project]) } diff --git a/spec/finders/snippets_finder_spec.rb b/spec/finders/snippets_finder_spec.rb index dfeeb3040c6..134fb5f2c04 100644 --- a/spec/finders/snippets_finder_spec.rb +++ b/spec/finders/snippets_finder_spec.rb @@ -107,7 +107,7 @@ describe SnippetsFinder do context 'filter by project' do let(:user) { create :user } let(:group) { create :group, :public } - let(:project1) { create(:project, :public, group: group) } + let(:project1) { create(:project, :public, group: group) } before do @snippet1 = create(:project_snippet, :private, project: project1) diff --git a/spec/graphql/resolvers/project_pipelines_resolver_spec.rb b/spec/graphql/resolvers/project_pipelines_resolver_spec.rb index 407ca2f9d78..6862ae8a5ed 100644 --- a/spec/graphql/resolvers/project_pipelines_resolver_spec.rb +++ b/spec/graphql/resolvers/project_pipelines_resolver_spec.rb @@ -4,7 +4,7 @@ describe Resolvers::ProjectPipelinesResolver do include GraphqlHelpers set(:project) { create(:project) } - set(:pipeline) { create(:ci_pipeline, project: project) } + set(:pipeline) { create(:ci_pipeline, project: project) } set(:other_pipeline) { create(:ci_pipeline) } let(:current_user) { create(:user) } diff --git a/spec/graphql/types/permission_types/base_permission_type_spec.rb b/spec/graphql/types/permission_types/base_permission_type_spec.rb index a7e51797047..0ee8b883d51 100644 --- a/spec/graphql/types/permission_types/base_permission_type_spec.rb +++ b/spec/graphql/types/permission_types/base_permission_type_spec.rb @@ -8,7 +8,7 @@ describe Types::PermissionTypes::BasePermissionType do Class.new(described_class) do graphql_name 'TestClass' - permission_field :do_stuff, resolve: -> (_, _, _) { true } + permission_field :do_stuff, resolve: -> (_, _, _) { true } ability_field(:read_issue) abilities :admin_issue end diff --git a/spec/graphql/types/permission_types/project_spec.rb b/spec/graphql/types/permission_types/project_spec.rb index 927153adc5b..4288412eda3 100644 --- a/spec/graphql/types/permission_types/project_spec.rb +++ b/spec/graphql/types/permission_types/project_spec.rb @@ -5,7 +5,7 @@ describe Types::PermissionTypes::Project do expected_permissions = [ :change_namespace, :change_visibility_level, :rename_project, :remove_project, :archive_project, :remove_fork_project, :remove_pages, :read_project, :create_merge_request_in, - :read_wiki, :read_project_member, :create_issue, :upload_file, :read_cycle_analytics, + :read_wiki, :read_project_member, :create_issue, :upload_file, :read_cycle_analytics, :download_code, :download_wiki_code, :fork_project, :create_project_snippet, :read_commit_status, :request_access, :create_pipeline, :create_pipeline_schedule, :create_merge_request_from, :create_wiki, :push_code, :create_deployment, :push_to_delete_protected_branch, diff --git a/spec/graphql/types/project_type_spec.rb b/spec/graphql/types/project_type_spec.rb index 61d4c42665a..01d71abfac9 100644 --- a/spec/graphql/types/project_type_spec.rb +++ b/spec/graphql/types/project_type_spec.rb @@ -10,7 +10,7 @@ describe GitlabSchema.types['Project'] do it 'authorizes the merge request' do expect(described_class.fields['mergeRequest']) - .to require_graphql_authorizations(:read_merge_request) + .to require_graphql_authorizations(:read_merge_request) end end diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb index 81231cca085..412ec910f3a 100644 --- a/spec/helpers/issuables_helper_spec.rb +++ b/spec/helpers/issuables_helper_spec.rb @@ -5,8 +5,8 @@ describe IssuablesHelper do let(:label2) { build_stubbed(:label) } describe '#users_dropdown_label' do - let(:user) { build_stubbed(:user) } - let(:user2) { build_stubbed(:user) } + let(:user) { build_stubbed(:user) } + let(:user2) { build_stubbed(:user) } it 'returns unassigned' do expect(users_dropdown_label([])).to eq('Unassigned') @@ -22,7 +22,7 @@ describe IssuablesHelper do end describe '#group_dropdown_label' do - let(:group) { create(:group) } + let(:group) { create(:group) } let(:default) { 'default label' } it 'returns default group label when group_id is nil' do diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index 8bb2e234e9a..039143eb8d7 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -148,7 +148,7 @@ describe IssuesHelper do end describe "when passing a discussion" do - let(:diff_note) { create(:diff_note_on_merge_request) } + let(:diff_note) { create(:diff_note_on_merge_request) } let(:merge_request) { diff_note.noteable } let(:discussion) { diff_note.to_discussion } diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb index 4945749f524..9cff0291250 100644 --- a/spec/helpers/search_helper_spec.rb +++ b/spec/helpers/search_helper_spec.rb @@ -18,7 +18,7 @@ describe SearchHelper do end context "with a standard user" do - let(:user) { create(:user) } + let(:user) { create(:user) } before do allow(self).to receive(:current_user).and_return(user) diff --git a/spec/lib/banzai/color_parser_spec.rb b/spec/lib/banzai/color_parser_spec.rb index a1cb0c07b06..af2a8f215c1 100644 --- a/spec/lib/banzai/color_parser_spec.rb +++ b/spec/lib/banzai/color_parser_spec.rb @@ -57,7 +57,7 @@ describe Banzai::ColorParser do context 'HSL format' do [ - 'hsl(0,0%,0%)', 'hsl(0,100%,100%)', + 'hsl(0,0%,0%)', 'hsl(0,100%,100%)', 'hsl(540,0%,0%)', 'hsl(-720,0%,0%)', 'hsl(0deg,0%,0%)', 'hsl(0DEG,0%,0%)', 'hsl(0, 0%, 0%)', 'HSL(0,0%,0%)', diff --git a/spec/lib/banzai/filter/commit_range_reference_filter_spec.rb b/spec/lib/banzai/filter/commit_range_reference_filter_spec.rb index cbff2fdab14..4daf6be1bb7 100644 --- a/spec/lib/banzai/filter/commit_range_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/commit_range_reference_filter_spec.rb @@ -205,7 +205,7 @@ describe Banzai::Filter::CommitRangeReferenceFilter do context 'cross-project URL reference' do let(:namespace) { create(:namespace) } let(:project2) { create(:project, :public, :repository, namespace: namespace) } - let(:range) { CommitRange.new("#{commit1.id}...master", project) } + let(:range) { CommitRange.new("#{commit1.id}...master", project) } let(:reference) { urls.project_compare_url(project2, from: commit1.id, to: 'master') } before do diff --git a/spec/lib/banzai/filter/issue_reference_filter_spec.rb b/spec/lib/banzai/filter/issue_reference_filter_spec.rb index 905fbb9434b..914c4e2d823 100644 --- a/spec/lib/banzai/filter/issue_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/issue_reference_filter_spec.rb @@ -445,7 +445,7 @@ describe Banzai::Filter::IssueReferenceFilter do end describe '.references_in' do - let(:merge_request) { create(:merge_request) } + let(:merge_request) { create(:merge_request) } it 'yields valid references' do expect do |b| diff --git a/spec/lib/banzai/filter/label_reference_filter_spec.rb b/spec/lib/banzai/filter/label_reference_filter_spec.rb index 9cfdb9e53a2..108d7b43a26 100644 --- a/spec/lib/banzai/filter/label_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/label_reference_filter_spec.rb @@ -237,7 +237,7 @@ describe Banzai::Filter::LabelReferenceFilter do end context 'References with html entities' do - let!(:label) { create(:label, name: '<html>', project: project) } + let!(:label) { create(:label, name: '<html>', project: project) } it 'links to a valid reference' do doc = reference_filter('See ~"<html>"') diff --git a/spec/lib/banzai/filter/project_reference_filter_spec.rb b/spec/lib/banzai/filter/project_reference_filter_spec.rb index 48140305e26..c68d49f9366 100644 --- a/spec/lib/banzai/filter/project_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/project_reference_filter_spec.rb @@ -13,7 +13,7 @@ describe Banzai::Filter::ProjectReferenceFilter do project.to_reference_with_postfix end - let(:project) { create(:project, :public) } + let(:project) { create(:project, :public) } subject { project } let(:subject_name) { "project" } let(:reference) { get_reference(project) } diff --git a/spec/lib/gitlab/auth/o_auth/identity_linker_spec.rb b/spec/lib/gitlab/auth/o_auth/identity_linker_spec.rb index 528f1b4ec57..bf810d72f0e 100644 --- a/spec/lib/gitlab/auth/o_auth/identity_linker_spec.rb +++ b/spec/lib/gitlab/auth/o_auth/identity_linker_spec.rb @@ -23,7 +23,7 @@ describe Gitlab::Auth::OAuth::IdentityLinker do end context 'identity already linked to different user' do - let!(:identity) { create(:identity, provider: provider, extern_uid: uid) } + let!(:identity) { create(:identity, provider: provider, extern_uid: uid) } it "#changed? returns false" do subject.link diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index 9ccd0b206cc..236808c0b69 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -380,7 +380,7 @@ describe Gitlab::Auth do password: password, password_confirmation: password) end - let(:username) { 'John' } # username isn't lowercase, test this + let(:username) { 'John' } # username isn't lowercase, test this let(:password) { 'my-secret' } it "finds user by valid login/password" do diff --git a/spec/lib/gitlab/background_migration/populate_import_state_spec.rb b/spec/lib/gitlab/background_migration/populate_import_state_spec.rb index f9952ee5163..fcb869022de 100644 --- a/spec/lib/gitlab/background_migration/populate_import_state_spec.rb +++ b/spec/lib/gitlab/background_migration/populate_import_state_spec.rb @@ -4,7 +4,7 @@ describe Gitlab::BackgroundMigration::PopulateImportState, :migration, schema: 2 let(:migration) { described_class.new } let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } - let(:import_state) { table(:project_mirror_data) } + let(:import_state) { table(:project_mirror_data) } before do namespaces.create(id: 1, name: 'gitlab-org', path: 'gitlab-org') diff --git a/spec/lib/gitlab/background_migration/rollback_import_state_data_spec.rb b/spec/lib/gitlab/background_migration/rollback_import_state_data_spec.rb index 9f8c3bc220f..cef3b6e4568 100644 --- a/spec/lib/gitlab/background_migration/rollback_import_state_data_spec.rb +++ b/spec/lib/gitlab/background_migration/rollback_import_state_data_spec.rb @@ -4,7 +4,7 @@ describe Gitlab::BackgroundMigration::RollbackImportStateData, :migration, schem let(:migration) { described_class.new } let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } - let(:import_state) { table(:project_mirror_data) } + let(:import_state) { table(:project_mirror_data) } before do namespaces.create(id: 1, name: 'gitlab-org', path: 'gitlab-org') diff --git a/spec/lib/gitlab/bitbucket_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_import/importer_spec.rb index 7a681bc6610..0def685f177 100644 --- a/spec/lib/gitlab/bitbucket_import/importer_spec.rb +++ b/spec/lib/gitlab/bitbucket_import/importer_spec.rb @@ -15,7 +15,7 @@ describe Gitlab::BitbucketImport::Importer do "invalid", "duplicate", "wontfix", - "closed" # undocumented status + "closed" # undocumented status ] end diff --git a/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb index be9b2588c90..483c5ea9cff 100644 --- a/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb +++ b/spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb @@ -238,7 +238,7 @@ describe Gitlab::Cache::Ci::ProjectPipelineStatus, :clean_gitlab_redis_cache do end describe '#delete_from_cache' do - it 'deletes values from redis_cache' do + it 'deletes values from redis_cache' do pipeline_status.delete_from_cache key_exists = Gitlab::Redis::Cache.with { |redis| redis.exists(cache_key) } diff --git a/spec/lib/gitlab/ci/config_spec.rb b/spec/lib/gitlab/ci/config_spec.rb index cd6d2a2f343..18f255c1ab7 100644 --- a/spec/lib/gitlab/ci/config_spec.rb +++ b/spec/lib/gitlab/ci/config_spec.rb @@ -192,7 +192,7 @@ describe Gitlab::Ci::Config do end end - context "when gitlab_ci.yml has invalid 'include' defined" do + context "when gitlab_ci.yml has invalid 'include' defined" do let(:gitlab_ci_yml) do <<~HEREDOC include: invalid @@ -207,7 +207,7 @@ describe Gitlab::Ci::Config do end end - context "when gitlab_ci.yml has ambigious 'include' defined" do + context "when gitlab_ci.yml has ambigious 'include' defined" do let(:gitlab_ci_yml) do <<~HEREDOC include: diff --git a/spec/lib/gitlab/ci/yaml_processor_spec.rb b/spec/lib/gitlab/ci/yaml_processor_spec.rb index b6c3431728c..20c35573cfb 100644 --- a/spec/lib/gitlab/ci/yaml_processor_spec.rb +++ b/spec/lib/gitlab/ci/yaml_processor_spec.rb @@ -888,7 +888,7 @@ module Gitlab end context 'without matching job' do - let(:close_review) { nil } + let(:close_review) { nil } it 'raises error' do expect { builds }.to raise_error('review job: on_stop job close_review is not defined') diff --git a/spec/lib/gitlab/diff/position_tracer_spec.rb b/spec/lib/gitlab/diff/position_tracer_spec.rb index a2eed07ca55..866550753a8 100644 --- a/spec/lib/gitlab/diff/position_tracer_spec.rb +++ b/spec/lib/gitlab/diff/position_tracer_spec.rb @@ -1515,8 +1515,8 @@ describe Gitlab::Diff::PositionTracer do { new_path: file_name, new_line: 4, change: true }, { new_path: file_name, old_line: 3, change: true }, { old_path: file_name, new_path: file_name, old_line: 5, new_line: 5 }, - { new_path: file_name, old_line: 5, change: true }, - { new_path: file_name, new_line: 7 } + { new_path: file_name, old_line: 5, change: true }, + { new_path: file_name, new_line: 7 } ] expect_new_positions(old_position_attrs, new_position_attrs) @@ -1588,7 +1588,7 @@ describe Gitlab::Diff::PositionTracer do { new_path: file_name, new_line: 4, change: true }, { old_path: file_name, old_line: 3, change: true }, { old_path: file_name, new_path: file_name, old_line: 5, new_line: 5 }, - { old_path: file_name, old_line: 5, change: true }, + { old_path: file_name, old_line: 5, change: true }, { new_path: file_name, new_line: 7 } ] @@ -1638,13 +1638,13 @@ describe Gitlab::Diff::PositionTracer do new_position_attrs = [ { old_path: file_name, new_path: file_name, old_line: 1, new_line: 1 }, { old_path: file_name, old_line: 2 }, - { old_path: file_name, old_line: 2, change: true }, + { old_path: file_name, old_line: 2, change: true }, { old_path: file_name, new_path: file_name, old_line: 3, new_line: 2 }, - { old_path: file_name, old_line: 4, change: true }, + { old_path: file_name, old_line: 4, change: true }, { old_path: file_name, new_path: file_name, old_line: 5, new_line: 4 }, - { new_path: file_name, new_line: 5, change: true }, - { old_path: file_name, old_line: 6, change: true }, - { new_path: file_name, new_line: 6 } + { new_path: file_name, new_line: 5, change: true }, + { old_path: file_name, old_line: 6, change: true }, + { new_path: file_name, new_line: 6 } ] expect_new_positions(old_position_attrs, new_position_attrs) @@ -1880,7 +1880,7 @@ describe Gitlab::Diff::PositionTracer do new_position_attrs = [ { old_path: file_name, new_path: file_name, old_line: 1, new_line: 1 }, - { old_path: file_name, old_line: 2, change: true }, + { old_path: file_name, old_line: 2, change: true }, { new_path: file_name, new_line: 2 }, { old_path: file_name, new_path: file_name, old_line: 2, new_line: 3 }, { new_path: file_name, new_line: 4 }, diff --git a/spec/lib/gitlab/git/compare_spec.rb b/spec/lib/gitlab/git/compare_spec.rb index 7cc6f52f8ee..771c71a16a9 100644 --- a/spec/lib/gitlab/git/compare_spec.rb +++ b/spec/lib/gitlab/git/compare_spec.rb @@ -67,7 +67,7 @@ describe Gitlab::Git::Compare, :seed_helper do end end - describe '#same' do + describe '#same' do subject do compare.same end diff --git a/spec/lib/gitlab/git/merge_base_spec.rb b/spec/lib/gitlab/git/merge_base_spec.rb index 8d16d451730..dbb4e3d0b3e 100644 --- a/spec/lib/gitlab/git/merge_base_spec.rb +++ b/spec/lib/gitlab/git/merge_base_spec.rb @@ -62,7 +62,7 @@ describe Gitlab::Git::MergeBase do end describe '#commit' do - context 'for existing refs with a merge base', :existing_refs do + context 'for existing refs with a merge base', :existing_refs do it 'finds the commit for the merge base' do expect(merge_base.commit).to be_a(Commit) end diff --git a/spec/lib/gitlab/graphql/connections/keyset_connection_spec.rb b/spec/lib/gitlab/graphql/connections/keyset_connection_spec.rb index 96615ae80de..9bcc1e78a78 100644 --- a/spec/lib/gitlab/graphql/connections/keyset_connection_spec.rb +++ b/spec/lib/gitlab/graphql/connections/keyset_connection_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Gitlab::Graphql::Connections::KeysetConnection do let(:nodes) { Project.all.order(id: :asc) } - let(:arguments) { {} } + let(:arguments) { {} } subject(:connection) do described_class.new(nodes, arguments, max_page_size: 3) end diff --git a/spec/lib/gitlab/import_export/importer_spec.rb b/spec/lib/gitlab/import_export/importer_spec.rb index 11f98d782b1..898e4d07760 100644 --- a/spec/lib/gitlab/import_export/importer_spec.rb +++ b/spec/lib/gitlab/import_export/importer_spec.rb @@ -29,7 +29,7 @@ describe Gitlab::ImportExport::Importer do expect(shared.errors).to be_empty end - it 'extracts the archive' do + it 'extracts the archive' do expect(Gitlab::ImportExport::FileImporter).to receive(:import).and_call_original importer.execute diff --git a/spec/lib/gitlab/import_export/reader_spec.rb b/spec/lib/gitlab/import_export/reader_spec.rb index 1ef024d3078..f93ff074770 100644 --- a/spec/lib/gitlab/import_export/reader_spec.rb +++ b/spec/lib/gitlab/import_export/reader_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::ImportExport::Reader do +describe Gitlab::ImportExport::Reader do let(:shared) { Gitlab::ImportExport::Shared.new(nil) } let(:test_config) { 'spec/support/import_export/import_export.yml' } let(:project_tree_hash) do diff --git a/spec/lib/gitlab/kubernetes/helm/pod_spec.rb b/spec/lib/gitlab/kubernetes/helm/pod_spec.rb index 9cb79148028..27c802f34ec 100644 --- a/spec/lib/gitlab/kubernetes/helm/pod_spec.rb +++ b/spec/lib/gitlab/kubernetes/helm/pod_spec.rb @@ -2,8 +2,8 @@ require 'rails_helper' describe Gitlab::Kubernetes::Helm::Pod do describe '#generate' do - let(:app) { create(:clusters_applications_prometheus) } - let(:command) { app.install_command } + let(:app) { create(:clusters_applications_prometheus) } + let(:command) { app.install_command } let(:namespace) { Gitlab::Kubernetes::Helm::NAMESPACE } let(:service_account_name) { nil } diff --git a/spec/lib/gitlab/slash_commands/issue_new_spec.rb b/spec/lib/gitlab/slash_commands/issue_new_spec.rb index 724c76ade6e..59de11766d8 100644 --- a/spec/lib/gitlab/slash_commands/issue_new_spec.rb +++ b/spec/lib/gitlab/slash_commands/issue_new_spec.rb @@ -44,7 +44,7 @@ describe Gitlab::SlashCommands::IssueNew do end context 'issue cannot be created' do - let!(:issue) { create(:issue, project: project, title: 'bird is the word') } + let!(:issue) { create(:issue, project: project, title: 'bird is the word') } let(:regex_match) { described_class.match("issue create #{'a' * 512}}") } it 'displays the errors' do diff --git a/spec/lib/gitlab/tree_summary_spec.rb b/spec/lib/gitlab/tree_summary_spec.rb index 7ffcef2baef..e22f898dc4c 100644 --- a/spec/lib/gitlab/tree_summary_spec.rb +++ b/spec/lib/gitlab/tree_summary_spec.rb @@ -180,7 +180,7 @@ describe Gitlab::TreeSummary do with_them do before do - create_file('dummy', path: 'other') if num_entries.zero? + create_file('dummy', path: 'other') if num_entries.zero? 1.upto(num_entries) { |n| create_file(n, path: path) } end diff --git a/spec/mailers/emails/pages_domains_spec.rb b/spec/mailers/emails/pages_domains_spec.rb index fe428ea657d..c74fd66ad22 100644 --- a/spec/mailers/emails/pages_domains_spec.rb +++ b/spec/mailers/emails/pages_domains_spec.rb @@ -6,7 +6,7 @@ describe Emails::PagesDomains do include_context 'gitlab email notification' set(:project) { create(:project) } - set(:domain) { create(:pages_domain, project: project) } + set(:domain) { create(:pages_domain, project: project) } set(:user) { project.owner } shared_examples 'a pages domain email' do diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index f2d99872401..1f5b4a8f908 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -887,7 +887,7 @@ describe Notify do allow(Note).to receive(:find).with(note.id).and_return(note) end - shared_examples 'an email for a note on a diff discussion' do |model| + shared_examples 'an email for a note on a diff discussion' do |model| let(:note) { create(model, author: note_author) } context 'when note is not on text' do diff --git a/spec/migrations/delete_inconsistent_internal_id_records_spec.rb b/spec/migrations/delete_inconsistent_internal_id_records_spec.rb index 51291cb362a..e2ce69a7bb1 100644 --- a/spec/migrations/delete_inconsistent_internal_id_records_spec.rb +++ b/spec/migrations/delete_inconsistent_internal_id_records_spec.rb @@ -102,7 +102,7 @@ describe DeleteInconsistentInternalIdRecords, :migration do context 'for milestones (by group)' do # milestones (by group) is a little different than most of the other models - let(:groups) { table(:namespaces) } + let(:groups) { table(:namespaces) } let(:group1) { groups.create(name: 'Group 1', type: 'Group', path: 'group_1') } let(:group2) { groups.create(name: 'Group 2', type: 'Group', path: 'group_2') } let(:group3) { groups.create(name: 'Group 2', type: 'Group', path: 'group_3') } diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 60d89313f07..8ba33ff9c04 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -2480,7 +2480,7 @@ describe Ci::Build do context 'when container registry is enabled' do let(:container_registry_enabled) { true } let(:ci_registry) do - { key: 'CI_REGISTRY', value: 'registry.example.com', public: true } + { key: 'CI_REGISTRY', value: 'registry.example.com', public: true } end let(:ci_registry_image) do { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_url, public: true } diff --git a/spec/models/clusters/kubernetes_namespace_spec.rb b/spec/models/clusters/kubernetes_namespace_spec.rb index 56c98d016c9..235e2ee4e69 100644 --- a/spec/models/clusters/kubernetes_namespace_spec.rb +++ b/spec/models/clusters/kubernetes_namespace_spec.rb @@ -28,7 +28,7 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do let(:cluster_project) { create(:cluster_project) } let(:kubernetes_namespace) { build(:cluster_kubernetes_namespace, namespace: 'my-namespace') } - subject { kubernetes_namespace } + subject { kubernetes_namespace } context 'when cluster is using the namespace' do before do diff --git a/spec/models/concerns/discussion_on_diff_spec.rb b/spec/models/concerns/discussion_on_diff_spec.rb index 4b16e6e3902..64bf04071e8 100644 --- a/spec/models/concerns/discussion_on_diff_spec.rb +++ b/spec/models/concerns/discussion_on_diff_spec.rb @@ -7,7 +7,7 @@ describe DiscussionOnDiff do let(:truncated_lines) { subject.truncated_diff_lines } context "when diff is greater than allowed number of truncated diff lines " do - it "returns fewer lines" do + it "returns fewer lines" do expect(subject.diff_lines.count).to be > DiffDiscussion::NUMBER_OF_TRUNCATED_DIFF_LINES expect(truncated_lines.count).to be <= DiffDiscussion::NUMBER_OF_TRUNCATED_DIFF_LINES diff --git a/spec/models/concerns/issuable_spec.rb b/spec/models/concerns/issuable_spec.rb index a4bf3e2350a..5753c646106 100644 --- a/spec/models/concerns/issuable_spec.rb +++ b/spec/models/concerns/issuable_spec.rb @@ -566,7 +566,7 @@ describe Issuable do end let(:merged_mr) { create(:merge_request, :merged, author: contributor, target_project: project, source_project: project) } - let(:open_mr) { create(:merge_request, author: first_time_contributor, target_project: project, source_project: project) } + let(:open_mr) { create(:merge_request, author: first_time_contributor, target_project: project, source_project: project) } let(:merged_mr_other_project) { create(:merge_request, :merged, author: first_time_contributor, target_project: other_project, source_project: other_project) } context "for merge requests" do diff --git a/spec/models/external_issue_spec.rb b/spec/models/external_issue_spec.rb index c8748daf46b..83ba22caa03 100644 --- a/spec/models/external_issue_spec.rb +++ b/spec/models/external_issue_spec.rb @@ -30,7 +30,7 @@ describe ExternalIssue do end context 'if issue id is a number' do - let(:issue) { described_class.new('1234', project) } + let(:issue) { described_class.new('1234', project) } it 'returns the issue ID prefixed by #' do expect(issue.reference_link_text).to eq '#1234' end diff --git a/spec/models/label_note_spec.rb b/spec/models/label_note_spec.rb index f69874d94aa..dd2c702a7a9 100644 --- a/spec/models/label_note_spec.rb +++ b/spec/models/label_note_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' describe LabelNote do - set(:project) { create(:project, :repository) } - set(:user) { create(:user) } + set(:project) { create(:project, :repository) } + set(:user) { create(:user) } set(:label) { create(:label, project: project) } set(:label2) { create(:label, project: project) } let(:resource_parent) { project } diff --git a/spec/models/lfs_file_lock_spec.rb b/spec/models/lfs_file_lock_spec.rb index e74f342d3eb..41ca1578b94 100644 --- a/spec/models/lfs_file_lock_spec.rb +++ b/spec/models/lfs_file_lock_spec.rb @@ -13,7 +13,7 @@ describe LfsFileLock do describe '#can_be_unlocked_by?' do let(:developer) { create(:user) } - let(:maintainer) { create(:user) } + let(:maintainer) { create(:user) } before do project = lfs_file_lock.project diff --git a/spec/models/members/project_member_spec.rb b/spec/models/members/project_member_spec.rb index 99d3ab41b97..36bfff2c339 100644 --- a/spec/models/members/project_member_spec.rb +++ b/spec/models/members/project_member_spec.rb @@ -39,7 +39,7 @@ describe ProjectMember do describe "#destroy" do let(:owner) { create(:project_member, access_level: ProjectMember::MAINTAINER) } let(:project) { owner.project } - let(:maintainer) { create(:project_member, project: project) } + let(:maintainer) { create(:project_member, project: project) } it "creates an expired event when left due to expiry" do expired = create(:project_member, project: project, expires_at: Time.now - 6.days) diff --git a/spec/models/merge_request_diff_commit_spec.rb b/spec/models/merge_request_diff_commit_spec.rb index 8c01a7ac18f..10487190a44 100644 --- a/spec/models/merge_request_diff_commit_spec.rb +++ b/spec/models/merge_request_diff_commit_spec.rb @@ -16,7 +16,7 @@ describe MergeRequestDiffCommit do end describe '.create_bulk' do - let(:sha_attribute) { Gitlab::Database::ShaAttribute.new } + let(:sha_attribute) { Gitlab::Database::ShaAttribute.new } let(:merge_request_diff_id) { merge_request.merge_request_diff.id } let(:commits) do [ diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index bfc9035cb56..b62f973ad1e 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -1032,7 +1032,7 @@ describe MergeRequest do end describe '#diverged_commits_count' do - let(:project) { create(:project, :repository) } + let(:project) { create(:project, :repository) } let(:forked_project) { fork_project(project, nil, repository: true) } context 'when the target branch does not exist anymore' do @@ -2298,9 +2298,9 @@ describe MergeRequest do end describe "#source_project_missing?" do - let(:project) { create(:project) } + let(:project) { create(:project) } let(:forked_project) { fork_project(project) } - let(:user) { create(:user) } + let(:user) { create(:user) } let(:unlink_project) { Projects::UnlinkForkService.new(forked_project, user) } context "when the fork exists" do @@ -2370,9 +2370,9 @@ describe MergeRequest do end describe "#closed_without_fork?" do - let(:project) { create(:project) } + let(:project) { create(:project) } let(:forked_project) { fork_project(project) } - let(:user) { create(:user) } + let(:user) { create(:user) } let(:unlink_project) { Projects::UnlinkForkService.new(forked_project, user) } context "when the merge request is closed" do @@ -2494,7 +2494,7 @@ describe MergeRequest do expect(merge_request.mergeable_with_quick_action?(user, last_diff_sha: mr_sha)).to be_falsey end - context 'closed MR' do + context 'closed MR' do before do merge_request.update_attribute(:state, :closed) end @@ -2504,7 +2504,7 @@ describe MergeRequest do end end - context 'MR with WIP' do + context 'MR with WIP' do before do merge_request.update_attribute(:title, 'WIP: some MR') end @@ -2514,19 +2514,19 @@ describe MergeRequest do end end - context 'sha differs from the MR diff_head_sha' do + context 'sha differs from the MR diff_head_sha' do it 'is not mergeable' do expect(merge_request.mergeable_with_quick_action?(developer, last_diff_sha: 'some other sha')).to be_falsey end end - context 'sha is not provided' do + context 'sha is not provided' do it 'is not mergeable' do expect(merge_request.mergeable_with_quick_action?(developer)).to be_falsey end end - context 'with pipeline ok' do + context 'with pipeline ok' do before do create_pipeline(:success) end @@ -2536,7 +2536,7 @@ describe MergeRequest do end end - context 'with failing pipeline' do + context 'with failing pipeline' do before do create_pipeline(:failed) end @@ -2546,7 +2546,7 @@ describe MergeRequest do end end - context 'with running pipeline' do + context 'with running pipeline' do before do create_pipeline(:running) end diff --git a/spec/models/project_services/drone_ci_service_spec.rb b/spec/models/project_services/drone_ci_service_spec.rb index d8972aff407..26597d9b83c 100644 --- a/spec/models/project_services/drone_ci_service_spec.rb +++ b/spec/models/project_services/drone_ci_service_spec.rb @@ -117,7 +117,7 @@ describe DroneCiService, :use_clean_rails_memory_store_caching do describe "execute" do include_context :drone_ci_service - let(:user) { create(:user, username: 'username') } + let(:user) { create(:user, username: 'username') } let(:push_sample_data) do Gitlab::DataBuilder::Push.build_sample(project, user) end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 7a8dc59039e..437f0066450 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -3926,7 +3926,7 @@ describe Project do describe '#badges' do let(:project_group) { create(:group) } - let(:project) { create(:project, path: 'avatar', namespace: project_group) } + let(:project) { create(:project, path: 'avatar', namespace: project_group) } before do create_list(:project_badge, 2, project: project) diff --git a/spec/models/resource_label_event_spec.rb b/spec/models/resource_label_event_spec.rb index e7e3f7376e6..3797960ac3d 100644 --- a/spec/models/resource_label_event_spec.rb +++ b/spec/models/resource_label_event_spec.rb @@ -88,7 +88,7 @@ RSpec.describe ResourceLabelEvent, type: :model do end it 'returns false if label and reference are set' do - subject.attributes = { reference: 'whatever', cached_markdown_version: CacheMarkdownField::CACHE_COMMONMARK_VERSION } + subject.attributes = { reference: 'whatever', cached_markdown_version: CacheMarkdownField::CACHE_COMMONMARK_VERSION } expect(subject.outdated_markdown?).to be false end diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb index 2a4030de998..7705704a07f 100644 --- a/spec/policies/project_policy_spec.rb +++ b/spec/policies/project_policy_spec.rb @@ -69,7 +69,7 @@ describe ProjectPolicy do end # Used in EE specs - let(:additional_guest_permissions) { [] } + let(:additional_guest_permissions) { [] } let(:additional_reporter_permissions) { [] } let(:additional_maintainer_permissions) { [] } @@ -236,7 +236,7 @@ describe ProjectPolicy do let(:group) { create(:group, :public) } let(:project) { create(:project, :public, namespace: group) } let(:user_permissions) { [:create_merge_request_in, :create_project, :create_issue, :create_note, :upload_file, :award_emoji] } - let(:anonymous_permissions) { guest_permissions - user_permissions } + let(:anonymous_permissions) { guest_permissions - user_permissions } subject { described_class.new(nil, project) } diff --git a/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb b/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb index 2cc0076d695..001545bb5df 100644 --- a/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb +++ b/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Projects::Settings::DeployKeysPresenter do let(:project) { create(:project) } let(:user) { create(:user) } - let(:deploy_key) { create(:deploy_key, public: true) } + let(:deploy_key) { create(:deploy_key, public: true) } let!(:deploy_keys_project) do create(:deploy_keys_project, project: project, deploy_key: deploy_key) diff --git a/spec/requests/api/avatar_spec.rb b/spec/requests/api/avatar_spec.rb index 17e66725dc9..9bc49bd5982 100644 --- a/spec/requests/api/avatar_spec.rb +++ b/spec/requests/api/avatar_spec.rb @@ -65,7 +65,7 @@ describe API::Avatar do expect(GravatarService).to receive(:new).and_return(gravatar_service) expect(gravatar_service).to( receive(:execute) - .with('private@example.com', nil, 2, { username: nil }) + .with('private@example.com', nil, 2, { username: nil }) .and_return('https://gravatar')) end diff --git a/spec/requests/api/award_emoji_spec.rb b/spec/requests/api/award_emoji_spec.rb index 22f6fcdc922..6c67d84b59b 100644 --- a/spec/requests/api/award_emoji_spec.rb +++ b/spec/requests/api/award_emoji_spec.rb @@ -7,7 +7,7 @@ describe API::AwardEmoji do set(:award_emoji) { create(:award_emoji, awardable: issue, user: user) } let!(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let!(:downvote) { create(:award_emoji, :downvote, awardable: merge_request, user: user) } - set(:note) { create(:note, project: project, noteable: issue) } + set(:note) { create(:note, project: project, noteable: issue) } before do project.add_maintainer(user) @@ -144,7 +144,7 @@ describe API::AwardEmoji do end describe "POST /projects/:id/awardable/:awardable_id/award_emoji" do - let(:issue2) { create(:issue, project: project, author: user) } + let(:issue2) { create(:issue, project: project, author: user) } context "on an issue" do it "creates a new award emoji" do diff --git a/spec/requests/api/boards_spec.rb b/spec/requests/api/boards_spec.rb index ab4f42cad47..de79e8c4c5c 100644 --- a/spec/requests/api/boards_spec.rb +++ b/spec/requests/api/boards_spec.rb @@ -31,7 +31,7 @@ describe API::Boards do set(:board_label) { create(:label, project: board_parent) } set(:board) { create(:board, project: board_parent, lists: [dev_list, test_list]) } - it_behaves_like 'group and project boards', "/projects/:id/boards" + it_behaves_like 'group and project boards', "/projects/:id/boards" describe "POST /projects/:id/boards/lists" do let(:url) { "/projects/#{board_parent.id}/boards/#{board.id}/lists" } diff --git a/spec/requests/api/discussions_spec.rb b/spec/requests/api/discussions_spec.rb index ef34192f888..35c448d187d 100644 --- a/spec/requests/api/discussions_spec.rb +++ b/spec/requests/api/discussions_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe API::Discussions do let(:user) { create(:user) } let!(:project) { create(:project, :public, :repository, namespace: user.namespace) } - let(:private_user) { create(:user) } + let(:private_user) { create(:user) } before do project.add_developer(user) diff --git a/spec/requests/api/group_milestones_spec.rb b/spec/requests/api/group_milestones_spec.rb index 108721c6655..6980eb7f55d 100644 --- a/spec/requests/api/group_milestones_spec.rb +++ b/spec/requests/api/group_milestones_spec.rb @@ -8,7 +8,7 @@ describe API::GroupMilestones do let!(:closed_milestone) { create(:closed_milestone, group: group, title: 'version1', description: 'closed milestone') } let!(:milestone) { create(:milestone, group: group, title: 'version2', description: 'open milestone') } - it_behaves_like 'group and project milestones', "/groups/:id/milestones" do + it_behaves_like 'group and project milestones', "/groups/:id/milestones" do let(:route) { "/groups/#{group.id}/milestones" } end diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 0fe63e2e517..6a943b5237a 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -32,7 +32,7 @@ describe API::Internal do context 'broadcast message exists' do let!(:broadcast_message) { create(:broadcast_message, starts_at: 1.day.ago, ends_at: 1.day.from_now ) } - it 'returns one broadcast message' do + it 'returns one broadcast message' do get api('/internal/broadcast_message'), params: { secret_token: secret_token } expect(response).to have_gitlab_http_status(200) @@ -41,7 +41,7 @@ describe API::Internal do end context 'broadcast message does not exist' do - it 'returns nothing' do + it 'returns nothing' do get api('/internal/broadcast_message'), params: { secret_token: secret_token } expect(response).to have_gitlab_http_status(200) @@ -867,7 +867,7 @@ describe API::Internal do context 'broadcast message exists' do let!(:broadcast_message) { create(:broadcast_message, starts_at: 1.day.ago, ends_at: 1.day.from_now ) } - it 'returns one broadcast message' do + it 'returns one broadcast message' do post api("/internal/post_receive"), params: valid_params expect(response).to have_gitlab_http_status(200) @@ -876,7 +876,7 @@ describe API::Internal do end context 'broadcast message does not exist' do - it 'returns empty string' do + it 'returns empty string' do post api("/internal/post_receive"), params: valid_params expect(response).to have_gitlab_http_status(200) diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index ba7930f6c9d..e0f1e303e96 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -993,7 +993,7 @@ describe API::Issues do end context 'user does not have permissions to create issue' do - let(:not_member) { create(:user) } + let(:not_member) { create(:user) } before do project.project_feature.update(issues_access_level: ProjectFeature::PRIVATE) diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 79c0a1953dc..4d42bc39ac3 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -10,7 +10,7 @@ describe API::MergeRequests do let!(:project) { create(:project, :public, :repository, creator: user, namespace: user.namespace, only_allow_merge_if_pipeline_succeeds: false) } let(:milestone) { create(:milestone, title: '1.0.0', project: project) } let(:pipeline) { create(:ci_empty_pipeline) } - let(:milestone1) { create(:milestone, title: '0.9', project: project) } + let(:milestone1) { create(:milestone, title: '0.9', project: project) } let!(:merge_request) { create(:merge_request, :simple, milestone: milestone1, author: user, assignee: user, source_project: project, target_project: project, title: "Test", created_at: base_time) } let!(:merge_request_closed) { create(:merge_request, state: "closed", milestone: milestone1, author: user, assignee: user, source_project: project, target_project: project, title: "Closed test", created_at: base_time + 1.second) } let!(:merge_request_merged) { create(:merge_request, state: "merged", author: user, assignee: user, source_project: project, target_project: project, title: "Merged test", created_at: base_time + 2.seconds, merge_commit_sha: '9999999999999999999999999999999999999999') } @@ -698,7 +698,7 @@ describe API::MergeRequests do let!(:user2) { create(:user) } let(:project) { create(:project, :public, :repository) } let!(:forked_project) { fork_project(project, user2, repository: true) } - let!(:unrelated_project) { create(:project, namespace: create(:user).namespace, creator_id: user2.id) } + let!(:unrelated_project) { create(:project, namespace: create(:user).namespace, creator_id: user2.id) } before do forked_project.add_reporter(user2) diff --git a/spec/requests/api/notes_spec.rb b/spec/requests/api/notes_spec.rb index 9bf753fe049..424f0a82e43 100644 --- a/spec/requests/api/notes_spec.rb +++ b/spec/requests/api/notes_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe API::Notes do let(:user) { create(:user) } let!(:project) { create(:project, :public, namespace: user.namespace) } - let(:private_user) { create(:user) } + let(:private_user) { create(:user) } before do project.add_reporter(user) @@ -46,7 +46,7 @@ describe API::Notes do create(:project, namespace: private_user.namespace) .tap { |p| p.add_maintainer(private_user) } end - let(:private_issue) { create(:issue, project: private_project) } + let(:private_issue) { create(:issue, project: private_project) } let(:ext_proj) { create(:project, :public) } let(:ext_issue) { create(:issue, project: ext_proj) } diff --git a/spec/requests/api/pages/private_access_spec.rb b/spec/requests/api/pages/private_access_spec.rb index d69c15b0477..c647537038e 100644 --- a/spec/requests/api/pages/private_access_spec.rb +++ b/spec/requests/api/pages/private_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Private Project Pages Access" do +describe "Private Project Pages Access" do using RSpec::Parameterized::TableSyntax include AccessMatchers diff --git a/spec/requests/api/pages/public_access_spec.rb b/spec/requests/api/pages/public_access_spec.rb index 882ca26ac51..16cc5697f30 100644 --- a/spec/requests/api/pages/public_access_spec.rb +++ b/spec/requests/api/pages/public_access_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Public Project Pages Access" do +describe "Public Project Pages Access" do using RSpec::Parameterized::TableSyntax include AccessMatchers diff --git a/spec/requests/api/project_milestones_spec.rb b/spec/requests/api/project_milestones_spec.rb index 0fa13dd71e2..49b5dfb0b33 100644 --- a/spec/requests/api/project_milestones_spec.rb +++ b/spec/requests/api/project_milestones_spec.rb @@ -10,7 +10,7 @@ describe API::ProjectMilestones do project.add_developer(user) end - it_behaves_like 'group and project milestones', "/projects/:id/milestones" do + it_behaves_like 'group and project milestones', "/projects/:id/milestones" do let(:route) { "/projects/#{project.id}/milestones" } end diff --git a/spec/requests/api/resource_label_events_spec.rb b/spec/requests/api/resource_label_events_spec.rb index b7d4a5152cc..37b46eaeb86 100644 --- a/spec/requests/api/resource_label_events_spec.rb +++ b/spec/requests/api/resource_label_events_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' describe API::ResourceLabelEvents do set(:user) { create(:user) } set(:project) { create(:project, :public, :repository, namespace: user.namespace) } - set(:private_user) { create(:user) } + set(:private_user) { create(:user) } before do project.add_developer(user) diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index f3431e0be3d..89151021f90 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -1785,7 +1785,7 @@ describe API::Users do end describe 'POST /users/:id/unblock' do - let(:blocked_user) { create(:user, state: 'blocked') } + let(:blocked_user) { create(:user, state: 'blocked') } before do admin diff --git a/spec/requests/lfs_locks_api_spec.rb b/spec/requests/lfs_locks_api_spec.rb index c63fbcdd84e..5b7b3d2fdd6 100644 --- a/spec/requests/lfs_locks_api_spec.rb +++ b/spec/requests/lfs_locks_api_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'Git LFS File Locking API' do include WorkhorseHelpers - let(:project) { create(:project) } + let(:project) { create(:project) } let(:maintainer) { create(:user) } let(:developer) { create(:user) } let(:guest) { create(:user) } @@ -160,7 +160,7 @@ describe 'Git LFS File Locking API' do post(url, params: body.try(:to_json), headers: (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE)) end - def do_get(url, params = nil, headers = nil) + def do_get(url, params = nil, headers = nil) get(url, params: (params || {}), headers: (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE)) end diff --git a/spec/requests/projects/cycle_analytics_events_spec.rb b/spec/requests/projects/cycle_analytics_events_spec.rb index bcc3e3a2678..49412b628b3 100644 --- a/spec/requests/projects/cycle_analytics_events_spec.rb +++ b/spec/requests/projects/cycle_analytics_events_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'cycle analytics events' do let(:user) { create(:user) } let(:project) { create(:project, :repository, public_builds: false) } - let(:issue) { create(:issue, project: project, created_at: 2.days.ago) } + let(:issue) { create(:issue, project: project, created_at: 2.days.ago) } describe 'GET /:namespace/:project/cycle_analytics/events/issues' do before do diff --git a/spec/requests/request_profiler_spec.rb b/spec/requests/request_profiler_spec.rb index 284a51fcc32..75b22b1879b 100644 --- a/spec/requests/request_profiler_spec.rb +++ b/spec/requests/request_profiler_spec.rb @@ -18,7 +18,7 @@ describe 'Request Profiler' do path = "/#{project.full_path}" Timecop.freeze(time) do - get path, params: {}, headers: { 'X-Profile-Token' => Gitlab::RequestProfiler.profile_token } + get path, params: {}, headers: { 'X-Profile-Token' => Gitlab::RequestProfiler.profile_token } end profile_path = "#{Gitlab.config.shared.path}/tmp/requests_profiles/#{path.tr('/', '|')}_#{time.to_i}.html" diff --git a/spec/serializers/container_repository_entity_spec.rb b/spec/serializers/container_repository_entity_spec.rb index c589cd18f77..15466bce514 100644 --- a/spec/serializers/container_repository_entity_spec.rb +++ b/spec/serializers/container_repository_entity_spec.rb @@ -19,7 +19,7 @@ describe ContainerRepositoryEntity do allow(request).to receive(:current_user).and_return(user) end - it 'exposes required informations' do + it 'exposes required informations' do expect(subject).to include(:id, :path, :location, :tags_path) end diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb index 8793a762f9d..cfa5414b40f 100644 --- a/spec/serializers/deployment_entity_spec.rb +++ b/spec/serializers/deployment_entity_spec.rb @@ -11,7 +11,7 @@ describe DeploymentEntity do allow(request).to receive(:current_user).and_return(user) end - it 'exposes internal deployment id' do + it 'exposes internal deployment id' do expect(subject).to include(:iid) end diff --git a/spec/services/application_settings/update_service_spec.rb b/spec/services/application_settings/update_service_spec.rb index daf5dfba6b1..a4a733eff77 100644 --- a/spec/services/application_settings/update_service_spec.rb +++ b/spec/services/application_settings/update_service_spec.rb @@ -17,7 +17,7 @@ describe ApplicationSettings::UpdateService do describe 'updating terms' do context 'when the passed terms are blank' do - let(:params) { { terms: '' } } + let(:params) { { terms: '' } } it 'does not create terms' do expect { subject.execute }.not_to change { ApplicationSetting::Term.count } @@ -25,7 +25,7 @@ describe ApplicationSettings::UpdateService do end context 'when passing terms' do - let(:params) { { terms: 'Be nice! ' } } + let(:params) { { terms: 'Be nice! ' } } it 'creates the terms' do expect { subject.execute }.to change { ApplicationSetting::Term.count }.by(1) diff --git a/spec/services/boards/issues/list_service_spec.rb b/spec/services/boards/issues/list_service_spec.rb index 010679b5360..aaad29536af 100644 --- a/spec/services/boards/issues/list_service_spec.rb +++ b/spec/services/boards/issues/list_service_spec.rb @@ -12,7 +12,7 @@ describe Boards::Issues::ListService do let(:bug) { create(:label, project: project, name: 'Bug') } let(:development) { create(:label, project: project, name: 'Development') } - let(:testing) { create(:label, project: project, name: 'Testing') } + let(:testing) { create(:label, project: project, name: 'Testing') } let(:p1) { create(:label, title: 'P1', project: project, priority: 1) } let(:p2) { create(:label, title: 'P2', project: project, priority: 2) } let(:p3) { create(:label, title: 'P3', project: project, priority: 3) } @@ -63,7 +63,7 @@ describe Boards::Issues::ListService do let(:bug) { create(:group_label, group: group, name: 'Bug') } let(:development) { create(:group_label, group: group, name: 'Development') } - let(:testing) { create(:group_label, group: group, name: 'Testing') } + let(:testing) { create(:group_label, group: group, name: 'Testing') } let(:p1) { create(:group_label, title: 'P1', group: group) } let(:p2) { create(:group_label, title: 'P2', group: group) } diff --git a/spec/services/boards/issues/move_service_spec.rb b/spec/services/boards/issues/move_service_spec.rb index dd0ad5f11bd..6020f0771e5 100644 --- a/spec/services/boards/issues/move_service_spec.rb +++ b/spec/services/boards/issues/move_service_spec.rb @@ -10,7 +10,7 @@ describe Boards::Issues::MoveService do let(:bug) { create(:label, project: project, name: 'Bug') } let(:development) { create(:label, project: project, name: 'Development') } - let(:testing) { create(:label, project: project, name: 'Testing') } + let(:testing) { create(:label, project: project, name: 'Testing') } let(:regression) { create(:label, project: project, name: 'Regression') } let!(:list1) { create(:list, board: board1, label: development, position: 0) } @@ -35,7 +35,7 @@ describe Boards::Issues::MoveService do let(:bug) { create(:group_label, group: group, name: 'Bug') } let(:development) { create(:group_label, group: group, name: 'Development') } - let(:testing) { create(:group_label, group: group, name: 'Testing') } + let(:testing) { create(:group_label, group: group, name: 'Testing') } let(:regression) { create(:group_label, group: group, name: 'Regression') } let!(:list1) { create(:list, board: board1, label: development, position: 0) } diff --git a/spec/services/event_create_service_spec.rb b/spec/services/event_create_service_spec.rb index 68e310b0506..443665c9959 100644 --- a/spec/services/event_create_service_spec.rb +++ b/spec/services/event_create_service_spec.rb @@ -144,7 +144,7 @@ describe EventCreateService do it 'updates user last activity' do expect { service.push(project, user, push_data) } - .to change { user.last_activity_on }.to(Date.today) + .to change { user.last_activity_on }.to(Date.today) end it 'caches the last push event for the user' do diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index 45ef26aebbd..e8fce951155 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -15,7 +15,7 @@ describe GitPushService, services: true do end describe 'with remote mirrors' do - let(:project) { create(:project, :repository, :remote_mirror) } + let(:project) { create(:project, :repository, :remote_mirror) } subject do described_class.new(project, user, oldrev: oldrev, newrev: newrev, ref: ref) @@ -547,7 +547,7 @@ describe GitPushService, services: true do end context "closing an issue" do - let(:message) { "this is some work.\n\ncloses JIRA-1" } + let(:message) { "this is some work.\n\ncloses JIRA-1" } let(:comment_body) do { body: "Issue solved with [#{closing_commit.id}|http://#{Gitlab.config.gitlab.host}/#{project.full_path}/commit/#{closing_commit.id}]." diff --git a/spec/services/issues/create_service_spec.rb b/spec/services/issues/create_service_spec.rb index c61c1ddcb3d..715b1168bfb 100644 --- a/spec/services/issues/create_service_spec.rb +++ b/spec/services/issues/create_service_spec.rb @@ -172,7 +172,7 @@ describe Issues::CreateService do end it 'removes assignee when user id is 0' do - opts = { title: 'Title', description: 'Description', assignee_ids: [0] } + opts = { title: 'Title', description: 'Description', assignee_ids: [0] } issue = described_class.new(project, user, opts).execute diff --git a/spec/services/labels/find_or_create_service_spec.rb b/spec/services/labels/find_or_create_service_spec.rb index 97ba2742392..7af514a5bea 100644 --- a/spec/services/labels/find_or_create_service_spec.rb +++ b/spec/services/labels/find_or_create_service_spec.rb @@ -46,7 +46,7 @@ describe Labels::FindOrCreateService do end context 'when include_ancestor_groups is true' do - let(:group) { create(:group, :nested) } + let(:group) { create(:group, :nested) } let(:params) do { title: 'Audit', diff --git a/spec/services/labels/promote_service_spec.rb b/spec/services/labels/promote_service_spec.rb index aa9aba6bdff..c4c7f33e36a 100644 --- a/spec/services/labels/promote_service_spec.rb +++ b/spec/services/labels/promote_service_spec.rb @@ -5,9 +5,9 @@ describe Labels::PromoteService do let!(:user) { create(:user) } context 'project without group' do - let!(:project_1) { create(:project) } + let!(:project_1) { create(:project) } - let!(:project_label_1_1) { create(:label, project: project_1) } + let!(:project_label_1_1) { create(:label, project: project_1) } subject(:service) { described_class.new(project_1, user) } diff --git a/spec/services/lfs/unlock_file_service_spec.rb b/spec/services/lfs/unlock_file_service_spec.rb index 539417644db..fe42ca41633 100644 --- a/spec/services/lfs/unlock_file_service_spec.rb +++ b/spec/services/lfs/unlock_file_service_spec.rb @@ -62,7 +62,7 @@ describe Lfs::UnlockFileService do context 'when forced' do let(:developer) { create(:user) } - let(:maintainer) { create(:user) } + let(:maintainer) { create(:user) } before do project.add_developer(developer) diff --git a/spec/services/merge_requests/create_service_spec.rb b/spec/services/merge_requests/create_service_spec.rb index 308f99dc0da..4e64b0c9414 100644 --- a/spec/services/merge_requests/create_service_spec.rb +++ b/spec/services/merge_requests/create_service_spec.rb @@ -301,7 +301,7 @@ describe MergeRequests::CreateService do end it 'removes assignee_id when user id is 0' do - opts = { title: 'Title', description: 'Description', assignee_id: 0 } + opts = { title: 'Title', description: 'Description', assignee_id: 0 } merge_request = described_class.new(project, user, opts).execute diff --git a/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb index 95c9b6e63b8..fcc87196d5a 100644 --- a/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb @@ -107,7 +107,7 @@ describe Projects::LfsPointers::LfsDownloadService do end end - context 'when an lfs object with the same oid already exists' do + context 'when an lfs object with the same oid already exists' do before do create(:lfs_object, oid: 'oid') end diff --git a/spec/services/resource_events/change_labels_service_spec.rb b/spec/services/resource_events/change_labels_service_spec.rb index 4c9138fb1ef..070964eb1ec 100644 --- a/spec/services/resource_events/change_labels_service_spec.rb +++ b/spec/services/resource_events/change_labels_service_spec.rb @@ -10,7 +10,7 @@ describe ResourceEvents::ChangeLabelsService do describe '.change_labels' do subject { described_class.new(resource, author).execute(added_labels: added, removed_labels: removed) } - let(:labels) { create_list(:label, 2, project: project) } + let(:labels) { create_list(:label, 2, project: project) } def expect_label_event(event, label, action) expect(event.user).to eq(author) diff --git a/spec/services/resource_events/merge_into_notes_service_spec.rb b/spec/services/resource_events/merge_into_notes_service_spec.rb index c76f6e6f77e..14c43b46c15 100644 --- a/spec/services/resource_events/merge_into_notes_service_spec.rb +++ b/spec/services/resource_events/merge_into_notes_service_spec.rb @@ -16,8 +16,8 @@ describe ResourceEvents::MergeIntoNotesService do create(:note_on_issue, opts.merge(params)) end - set(:project) { create(:project) } - set(:user) { create(:user) } + set(:project) { create(:project) } + set(:user) { create(:user) } set(:resource) { create(:issue, project: project) } set(:label) { create(:label, project: project) } set(:label2) { create(:label, project: project) } diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 0fbfcb34e50..82544ab0413 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -819,7 +819,7 @@ describe SystemNoteService do end context 'for issues' do - let(:issue) { create(:issue, project: project) } + let(:issue) { create(:issue, project: project) } it "creates comment" do result = described_class.cross_reference(jira_issue, issue, author) @@ -1131,7 +1131,7 @@ describe SystemNoteService do end context 'across different projects' do - let(:other_project) { create(:project) } + let(:other_project) { create(:project) } let(:canonical_issue) { create(:issue, project: other_project) } it_behaves_like 'a system note' do @@ -1156,7 +1156,7 @@ describe SystemNoteService do end context 'across different projects' do - let(:other_project) { create(:project) } + let(:other_project) { create(:project) } let(:duplicate_issue) { create(:issue, project: other_project) } it_behaves_like 'a system note' do @@ -1168,7 +1168,7 @@ describe SystemNoteService do end describe '.discussion_lock' do - subject { described_class.discussion_lock(noteable, author) } + subject { described_class.discussion_lock(noteable, author) } context 'discussion unlocked' do it_behaves_like 'a system note' do diff --git a/spec/services/todo_service_spec.rb b/spec/services/todo_service_spec.rb index 253f2e44d10..8631f3f9a33 100644 --- a/spec/services/todo_service_spec.rb +++ b/spec/services/todo_service_spec.rb @@ -457,7 +457,7 @@ describe TodoService do end context 'on commit' do - let(:project) { create(:project, :repository) } + let(:project) { create(:project, :repository) } it 'creates a todo for each valid mentioned user when leaving a note on commit' do service.new_note(note_on_commit, john_doe) diff --git a/spec/services/todos/destroy/entity_leave_service_spec.rb b/spec/services/todos/destroy/entity_leave_service_spec.rb index 8cb91e7c1b9..4b238280848 100644 --- a/spec/services/todos/destroy/entity_leave_service_spec.rb +++ b/spec/services/todos/destroy/entity_leave_service_spec.rb @@ -173,10 +173,10 @@ describe Todos::Destroy::EntityLeaveService do let(:subproject) { create(:project, group: subgroup) } let(:subproject2) { create(:project, group: subgroup2) } - let!(:todo_subproject_user) { create(:todo, user: user, project: subproject) } - let!(:todo_subproject2_user) { create(:todo, user: user, project: subproject2) } - let!(:todo_subgroup_user) { create(:todo, user: user, group: subgroup) } - let!(:todo_subgroup2_user) { create(:todo, user: user, group: subgroup2) } + let!(:todo_subproject_user) { create(:todo, user: user, project: subproject) } + let!(:todo_subproject2_user) { create(:todo, user: user, project: subproject2) } + let!(:todo_subgroup_user) { create(:todo, user: user, group: subgroup) } + let!(:todo_subgroup2_user) { create(:todo, user: user, group: subgroup2) } let!(:todo_subproject_user2) { create(:todo, user: user2, project: subproject) } let!(:todo_subpgroup_user2) { create(:todo, user: user2, group: subgroup) } diff --git a/spec/services/todos/destroy/group_private_service_spec.rb b/spec/services/todos/destroy/group_private_service_spec.rb index 2f49b68f544..5cefbdd35ab 100644 --- a/spec/services/todos/destroy/group_private_service_spec.rb +++ b/spec/services/todos/destroy/group_private_service_spec.rb @@ -40,7 +40,7 @@ describe Todos::Destroy::GroupPrivateService do let(:parent_member) { create(:user) } let(:subgroup_member) { create(:user) } - let(:subgproject_member) { create(:user) } + let(:subgproject_member) { create(:user) } let!(:todo_parent_member) { create(:todo, user: parent_member, group: group) } let!(:todo_subgroup_member) { create(:todo, user: subgroup_member, group: group) } diff --git a/spec/services/users/migrate_to_ghost_user_service_spec.rb b/spec/services/users/migrate_to_ghost_user_service_spec.rb index ac3a8738cac..68b0f79c6d1 100644 --- a/spec/services/users/migrate_to_ghost_user_service_spec.rb +++ b/spec/services/users/migrate_to_ghost_user_service_spec.rb @@ -6,7 +6,7 @@ describe Users::MigrateToGhostUserService do let(:service) { described_class.new(user) } context "migrating a user's associated records to the ghost user" do - context 'issues' do + context 'issues' do context 'deleted user is present as both author and edited_user' do include_examples "migrating a deleted user's associated records to the ghost user", Issue, [:author, :last_edited_by] do let(:created_record) do diff --git a/spec/services/web_hook_service_spec.rb b/spec/services/web_hook_service_spec.rb index b1cc6d2eb83..5945a7dc0ad 100644 --- a/spec/services/web_hook_service_spec.rb +++ b/spec/services/web_hook_service_spec.rb @@ -61,7 +61,7 @@ describe WebHookService do end context 'when auth credentials are present' do - let(:url) {'https://example.org'} + let(:url) {'https://example.org'} let(:project_hook) { create(:project_hook, url: 'https://demo:demo@example.org/') } it 'uses the credentials' do @@ -76,7 +76,7 @@ describe WebHookService do end context 'when auth credentials are partial present' do - let(:url) {'https://example.org'} + let(:url) {'https://example.org'} let(:project_hook) { create(:project_hook, url: 'https://demo@example.org/') } it 'uses the credentials anyways' do diff --git a/spec/support/features/resolving_discussions_in_issues_shared_examples.rb b/spec/support/features/resolving_discussions_in_issues_shared_examples.rb index 4a946995f84..38e5fb155a4 100644 --- a/spec/support/features/resolving_discussions_in_issues_shared_examples.rb +++ b/spec/support/features/resolving_discussions_in_issues_shared_examples.rb @@ -5,7 +5,7 @@ shared_examples 'creating an issue for a discussion' do expect(title_field.value).to include(merge_request.title) end - it 'has a mention of the discussion in the description' do + it 'has a mention of the discussion in the description' do description_field = page.find_field('issue[description]') expect(description_field.value).to include(discussion.first_note.note) diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb index dd32ea3985f..ea3a03879c5 100644 --- a/spec/support/helpers/graphql_helpers.rb +++ b/spec/support/helpers/graphql_helpers.rb @@ -149,7 +149,7 @@ module GraphqlHelpers # - List # - String! # - String - field_type = field_type.of_type while field_type.respond_to?(:of_type) + field_type = field_type.of_type while field_type.respond_to?(:of_type) field_type end diff --git a/spec/support/helpers/login_helpers.rb b/spec/support/helpers/login_helpers.rb index 87cfb6c04dc..3fee6872498 100644 --- a/spec/support/helpers/login_helpers.rb +++ b/spec/support/helpers/login_helpers.rb @@ -157,7 +157,7 @@ module LoginHelpers env['omniauth.error.strategy'] = strategy end - def stub_omniauth_saml_config(messages, context: Rails.application) + def stub_omniauth_saml_config(messages, context: Rails.application) set_devise_mapping(context: context) routes = Rails.application.routes routes.disable_clear_and_finalize = true diff --git a/spec/support/redis/redis_shared_examples.rb b/spec/support/redis/redis_shared_examples.rb index e650a176041..a8b00004fe7 100644 --- a/spec/support/redis/redis_shared_examples.rb +++ b/spec/support/redis/redis_shared_examples.rb @@ -1,7 +1,7 @@ RSpec.shared_examples "redis_shared_examples" do include StubENV - let(:test_redis_url) { "redis://redishost:#{redis_port}"} + let(:test_redis_url) { "redis://redishost:#{redis_port}"} before do stub_env(environment_config_file_name, Rails.root.join(config_file_name)) @@ -76,7 +76,7 @@ RSpec.shared_examples "redis_shared_examples" do context 'when yml file with env variable' do let(:config_file_name) { config_with_environment_variable_inside } - before do + before do stub_env(config_env_variable_url, test_redis_url) end diff --git a/spec/support/shared_examples/malicious_regexp_shared_examples.rb b/spec/support/shared_examples/malicious_regexp_shared_examples.rb index 65026f1d7c0..db69b75c0c8 100644 --- a/spec/support/shared_examples/malicious_regexp_shared_examples.rb +++ b/spec/support/shared_examples/malicious_regexp_shared_examples.rb @@ -1,7 +1,7 @@ require 'timeout' shared_examples 'malicious regexp' do - let(:malicious_text) { 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!' } + let(:malicious_text) { 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!' } let(:malicious_regexp) { '(?i)^(([a-z])+.)+[A-Z]([a-z])+$' } it 'takes under a second' do diff --git a/spec/support/shared_examples/mentionable_shared_examples.rb b/spec/support/shared_examples/mentionable_shared_examples.rb index 1685decbe94..1226841f24c 100644 --- a/spec/support/shared_examples/mentionable_shared_examples.rb +++ b/spec/support/shared_examples/mentionable_shared_examples.rb @@ -8,8 +8,8 @@ shared_context 'mentionable context' do let(:project) { subject.project } let(:author) { subject.author } - let(:mentioned_issue) { create(:issue, project: project) } - let!(:mentioned_mr) { create(:merge_request, source_project: project) } + let(:mentioned_issue) { create(:issue, project: project) } + let!(:mentioned_mr) { create(:merge_request, source_project: project) } let(:mentioned_commit) { project.commit("HEAD~1") } let(:ext_proj) { create(:project, :public, :repository) } diff --git a/spec/support/shared_examples/url_validator_examples.rb b/spec/support/shared_examples/url_validator_examples.rb index b4757a70984..1f7e2f7ff79 100644 --- a/spec/support/shared_examples/url_validator_examples.rb +++ b/spec/support/shared_examples/url_validator_examples.rb @@ -1,5 +1,5 @@ RSpec.shared_examples 'url validator examples' do |protocols| - let(:validator) { described_class.new(attributes: [:link_url], **options) } + let(:validator) { described_class.new(attributes: [:link_url], **options) } let!(:badge) { build(:badge, link_url: 'http://www.example.com') } subject { validator.validate_each(badge, :link_url, badge.link_url) } diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb index db9e5eb2ad6..185c62491ce 100644 --- a/spec/uploaders/file_uploader_spec.rb +++ b/spec/uploaders/file_uploader_spec.rb @@ -4,7 +4,7 @@ describe FileUploader do let(:group) { create(:group, name: 'awesome') } let(:project) { create(:project, :legacy_storage, namespace: group, name: 'project') } let(:uploader) { described_class.new(project) } - let(:upload) { double(model: project, path: 'secret/foo.jpg') } + let(:upload) { double(model: project, path: 'secret/foo.jpg') } subject { uploader } diff --git a/spec/uploaders/import_export_uploader_spec.rb b/spec/uploaders/import_export_uploader_spec.rb index 51b173b682d..825c1cabc14 100644 --- a/spec/uploaders/import_export_uploader_spec.rb +++ b/spec/uploaders/import_export_uploader_spec.rb @@ -4,7 +4,7 @@ describe ImportExportUploader do let(:model) { build_stubbed(:import_export_upload) } let(:upload) { create(:upload, model: model) } - subject { described_class.new(model, :import_file) } + subject { described_class.new(model, :import_file) } context "object_store is REMOTE" do before do diff --git a/spec/workers/prune_old_events_worker_spec.rb b/spec/workers/prune_old_events_worker_spec.rb index b999a6fd5b6..ea2b6ae229e 100644 --- a/spec/workers/prune_old_events_worker_spec.rb +++ b/spec/workers/prune_old_events_worker_spec.rb @@ -5,8 +5,8 @@ describe PruneOldEventsWorker do let(:user) { create(:user) } let!(:expired_event) { create(:event, :closed, author: user, created_at: 25.months.ago) } - let!(:not_expired_1_day_event) { create(:event, :closed, author: user, created_at: 1.day.ago) } - let!(:not_expired_13_month_event) { create(:event, :closed, author: user, created_at: 13.months.ago) } + let!(:not_expired_1_day_event) { create(:event, :closed, author: user, created_at: 1.day.ago) } + let!(:not_expired_13_month_event) { create(:event, :closed, author: user, created_at: 13.months.ago) } let!(:not_expired_2_years_event) { create(:event, :closed, author: user, created_at: 2.years.ago) } it 'prunes events older than 2 years' do |