diff options
749 files changed, 976 insertions, 862 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index ed17799478a..1967cbfb982 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -450,6 +450,11 @@ Rails/TimeZone: - 'spec/models/**/*' - 'ee/app/models/**/*' - 'ee/spec/models/**/*' + - 'app/workers/**/*' + - 'spec/workers/**/*' + - 'ee/app/workers/**/*' + - 'ee/spec/workers/**/*' + # WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040 Rails/SaveBang: diff --git a/app/assets/javascripts/issuables_list/components/issuable.vue b/app/assets/javascripts/issuables_list/components/issuable.vue index 2fd92e009eb..e6db30384dc 100644 --- a/app/assets/javascripts/issuables_list/components/issuable.vue +++ b/app/assets/javascripts/issuables_list/components/issuable.vue @@ -3,8 +3,10 @@ * This is tightly coupled to projects/issues/_issue.html.haml, * any changes done to the haml need to be reflected here. */ + +// TODO: need to move this component to graphql - https://gitlab.com/gitlab-org/gitlab/-/issues/221246 import { escape, isNumber } from 'lodash'; -import { GlLink, GlTooltipDirective as GlTooltip } from '@gitlab/ui'; +import { GlLink, GlTooltipDirective as GlTooltip, GlLabel } from '@gitlab/ui'; import { dateInWords, formatDate, @@ -18,16 +20,21 @@ import initUserPopovers from '~/user_popovers'; import { mergeUrlParams } from '~/lib/utils/url_utility'; import Icon from '~/vue_shared/components/icon.vue'; import IssueAssignees from '~/vue_shared/components/issue/issue_assignees.vue'; +import { isScopedLabel } from '~/lib/utils/common_utils'; +import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; export default { + isScopedLabel, components: { Icon, IssueAssignees, GlLink, + GlLabel, }, directives: { GlTooltip, }, + mixins: [glFeatureFlagsMixin()], props: { issuable: { type: Object, @@ -57,8 +64,8 @@ export default { return this.issuableLink({ milestone_title: title }); }, - hasLabels() { - return Boolean(this.issuable.labels && this.issuable.labels.length); + scopedLabelsAvailable() { + return this.glFeatures.scopedLabels; }, hasWeight() { return isNumber(this.issuable.weight); @@ -163,15 +170,12 @@ export default { initUserPopovers([this.$refs.openedAgoByContainer.querySelector('a')]); }, methods: { - labelStyle(label) { - return { - backgroundColor: label.color, - color: label.text_color, - }; - }, issuableLink(params) { return mergeUrlParams(params, this.baseUrl); }, + isScoped({ name }) { + return isScopedLabel({ title: name }) && this.scopedLabelsAvailable; + }, labelHref({ name }) { return this.issuableLink({ 'label_name[]': name }); }, @@ -221,9 +225,9 @@ export default { ></i> <gl-link :href="issuable.web_url">{{ issuable.title }}</gl-link> </span> - <span v-if="issuable.has_tasks" class="ml-1 task-status d-none d-sm-inline-block">{{ - issuable.task_status - }}</span> + <span v-if="issuable.has_tasks" class="ml-1 task-status d-none d-sm-inline-block"> + {{ issuable.task_status }} + </span> </div> <div class="issuable-info"> @@ -256,22 +260,19 @@ export default { {{ dueDateWords }} </span> - <span v-if="hasLabels" class="js-labels"> - <gl-link - v-for="label in issuable.labels" - :key="label.id" - class="label-link mr-1" - :href="labelHref(label)" - > - <span - v-gl-tooltip - class="badge color-label" - :style="labelStyle(label)" - :title="label.description" - >{{ label.name }}</span - > - </gl-link> - </span> + <gl-label + v-for="label in issuable.labels" + :key="label.id" + :target="labelHref(label)" + :background-color="label.color" + :description="label.description" + :color="label.text_color" + :title="label.name" + :scoped="isScoped(label)" + size="sm" + class="mr-1" + >{{ label.name }}</gl-label + > <span v-if="hasWeight" diff --git a/app/graphql/resolvers/environments_resolver.rb b/app/graphql/resolvers/environments_resolver.rb index 4e9a17f1e17..1b916a89796 100644 --- a/app/graphql/resolvers/environments_resolver.rb +++ b/app/graphql/resolvers/environments_resolver.rb @@ -8,7 +8,7 @@ module Resolvers argument :search, GraphQL::STRING_TYPE, required: false, - description: 'Search query' + description: 'Search query for environment name' argument :states, [GraphQL::STRING_TYPE], required: false, diff --git a/app/graphql/resolvers/issues_resolver.rb b/app/graphql/resolvers/issues_resolver.rb index f103da07666..01538763da5 100644 --- a/app/graphql/resolvers/issues_resolver.rb +++ b/app/graphql/resolvers/issues_resolver.rb @@ -44,7 +44,7 @@ module Resolvers description: 'Issues closed after this date' argument :search, GraphQL::STRING_TYPE, required: false, - description: 'Search query for finding issues by title or description' + description: 'Search query for issue title or description' argument :sort, Types::IssueSortEnum, description: 'Sort issues by this criteria', required: false, diff --git a/app/graphql/resolvers/projects_resolver.rb b/app/graphql/resolvers/projects_resolver.rb index 068546cd39f..f75f591b381 100644 --- a/app/graphql/resolvers/projects_resolver.rb +++ b/app/graphql/resolvers/projects_resolver.rb @@ -10,7 +10,7 @@ module Resolvers argument :search, GraphQL::STRING_TYPE, required: false, - description: 'Search criteria' + description: 'Search query for project name, path, or description' def resolve(**args) ProjectsFinder diff --git a/app/graphql/types/error_tracking/sentry_error_collection_type.rb b/app/graphql/types/error_tracking/sentry_error_collection_type.rb index 121146133cb..f423fcb1b9f 100644 --- a/app/graphql/types/error_tracking/sentry_error_collection_type.rb +++ b/app/graphql/types/error_tracking/sentry_error_collection_type.rb @@ -17,7 +17,7 @@ module Types resolver: Resolvers::ErrorTracking::SentryErrorsResolver do argument :search_term, String, - description: 'Search term for the Sentry error.', + description: 'Search query for the Sentry error details', required: false argument :sort, String, diff --git a/app/workers/concerns/reenqueuer.rb b/app/workers/concerns/reenqueuer.rb index 5cc13e490d8..79a1d2d0070 100644 --- a/app/workers/concerns/reenqueuer.rb +++ b/app/workers/concerns/reenqueuer.rb @@ -73,7 +73,7 @@ module Reenqueuer # end # def ensure_minimum_duration(minimum_duration) - start_time = Time.now + start_time = Time.current result = yield @@ -95,7 +95,7 @@ module Reenqueuer end def elapsed_time(start_time) - Time.now - start_time + Time.current - start_time end end end diff --git a/app/workers/gitlab/jira_import/import_issue_worker.rb b/app/workers/gitlab/jira_import/import_issue_worker.rb index 7709d2ec31b..d1ceda4fd6a 100644 --- a/app/workers/gitlab/jira_import/import_issue_worker.rb +++ b/app/workers/gitlab/jira_import/import_issue_worker.rb @@ -62,7 +62,7 @@ module Gitlab end def build_label_attrs(issue_id, label_id) - time = Time.now + time = Time.current { label_id: label_id, target_id: issue_id, diff --git a/app/workers/process_commit_worker.rb b/app/workers/process_commit_worker.rb index 5756ebb8358..3c7af641f16 100644 --- a/app/workers/process_commit_worker.rb +++ b/app/workers/process_commit_worker.rb @@ -80,7 +80,7 @@ class ProcessCommitWorker # manually parse these values. hash.each do |key, value| if key.to_s.end_with?(date_suffix) && value.is_a?(String) - hash[key] = Time.parse(value) + hash[key] = Time.zone.parse(value) end end diff --git a/app/workers/repository_check/batch_worker.rb b/app/workers/repository_check/batch_worker.rb index 1e2cb912598..d47f738ccb0 100644 --- a/app/workers/repository_check/batch_worker.rb +++ b/app/workers/repository_check/batch_worker.rb @@ -34,7 +34,7 @@ module RepositoryCheck end def perform_repository_checks - start = Time.now + start = Time.current # This loop will break after a little more than one hour ('a little # more' because `git fsck` may take a few minutes), or if it runs out of @@ -42,7 +42,7 @@ module RepositoryCheck # RepositoryCheckWorker each hour so that as long as there are repositories to # check, only one (or two) will be checked at a time. project_ids.each do |project_id| - break if Time.now - start >= RUN_TIME + break if Time.current - start >= RUN_TIME next unless try_obtain_lease_for_project(project_id) diff --git a/app/workers/repository_check/single_repository_worker.rb b/app/workers/repository_check/single_repository_worker.rb index edff7fc31df..d757b87c23a 100644 --- a/app/workers/repository_check/single_repository_worker.rb +++ b/app/workers/repository_check/single_repository_worker.rb @@ -17,7 +17,7 @@ module RepositoryCheck def update_repository_check_status(project, healthy) project.update_columns( last_repository_check_failed: !healthy, - last_repository_check_at: Time.now + last_repository_check_at: Time.current ) end diff --git a/doc/.vale/gitlab/Acronyms.yml b/doc/.vale/gitlab/Acronyms.yml index 5176a18e2b6..4bfff72c154 100644 --- a/doc/.vale/gitlab/Acronyms.yml +++ b/doc/.vale/gitlab/Acronyms.yml @@ -3,7 +3,7 @@ # # Checks for unexpanded acronyms. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: conditional message: '"%s" has no definition.' link: https://about.gitlab.com/handbook/marketing/growth-marketing/content/editorial-team/#acronyms diff --git a/doc/.vale/gitlab/BadgeCapitalization.yml b/doc/.vale/gitlab/BadgeCapitalization.yml index c9e9da3b6ce..caf7143e254 100644 --- a/doc/.vale/gitlab/BadgeCapitalization.yml +++ b/doc/.vale/gitlab/BadgeCapitalization.yml @@ -3,7 +3,7 @@ # # Verifies that badges are not mixed case, which won't render properly. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Badge "%s" must be capitalized.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#product-badges diff --git a/doc/.vale/gitlab/British.yml b/doc/.vale/gitlab/British.yml index 1e5841d3648..3a0cb321f93 100644 --- a/doc/.vale/gitlab/British.yml +++ b/doc/.vale/gitlab/British.yml @@ -3,7 +3,7 @@ # # Checks that US spelling is used over British spelling. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: substitution message: 'Use the US spelling "%s" instead of the British "%s".' link: https://about.gitlab.com/handbook/communication/#top-misused-terms diff --git a/doc/.vale/gitlab/CodeblockFences.yml b/doc/.vale/gitlab/CodeblockFences.yml index 8b61a1a3c16..7258a8ef475 100644 --- a/doc/.vale/gitlab/CodeblockFences.yml +++ b/doc/.vale/gitlab/CodeblockFences.yml @@ -3,7 +3,7 @@ # # Ensures all codeblock language tags use the full name, not aliases. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Syntax highlighting hint "%s" must be one of: yaml, ruby, plaintext, markdown, javascript, shell, golang, python, dockerfile, or typescript.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#code-blocks diff --git a/doc/.vale/gitlab/Contractions.yml b/doc/.vale/gitlab/Contractions.yml index 45212945c53..d5ef52fb242 100644 --- a/doc/.vale/gitlab/Contractions.yml +++ b/doc/.vale/gitlab/Contractions.yml @@ -3,7 +3,7 @@ # # Checks for use of common and uncommon contractions. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: substitution message: 'Use "%s" instead of "%s", for a friendly, informal tone.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#language diff --git a/doc/.vale/gitlab/CurlStringsQuoted.yml b/doc/.vale/gitlab/CurlStringsQuoted.yml index 4fcb0069423..39ee9372947 100644 --- a/doc/.vale/gitlab/CurlStringsQuoted.yml +++ b/doc/.vale/gitlab/CurlStringsQuoted.yml @@ -3,7 +3,7 @@ # # Ensures all codeblocks using curl quote any URL strings. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Curl commands must wrap URLs in double quotes ("): %s' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#curl-commands diff --git a/doc/.vale/gitlab/CurrentStatus.yml b/doc/.vale/gitlab/CurrentStatus.yml index 52bcea23d5b..0d2c079f9a5 100644 --- a/doc/.vale/gitlab/CurrentStatus.yml +++ b/doc/.vale/gitlab/CurrentStatus.yml @@ -2,7 +2,7 @@ # Suggestion: gitlab.CurrentStatus # Checks for words that indicate a product or feature may change in the future. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Avoid words like "%s" that promise future changes.' level: suggestion diff --git a/doc/.vale/gitlab/FirstPerson.yml b/doc/.vale/gitlab/FirstPerson.yml index 6db89dd4758..d247f137501 100644 --- a/doc/.vale/gitlab/FirstPerson.yml +++ b/doc/.vale/gitlab/FirstPerson.yml @@ -3,7 +3,7 @@ # # Checks for use of first person pronouns. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: '"%s" is a first-person pronoun. Use second- or third-person pronouns (like we, you, us, one) instead.' level: warning diff --git a/doc/.vale/gitlab/InternalLinkExtension.yml b/doc/.vale/gitlab/InternalLinkExtension.yml index 94a935196a7..61a08e4a86c 100644 --- a/doc/.vale/gitlab/InternalLinkExtension.yml +++ b/doc/.vale/gitlab/InternalLinkExtension.yml @@ -3,7 +3,7 @@ # # Checks that internal links have .md extenstion and not .html extension. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Link "%s" must use the .md file extension.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#links-to-internal-documentation diff --git a/doc/.vale/gitlab/LatinTerms.yml b/doc/.vale/gitlab/LatinTerms.yml index a2d024fb1ec..26dba42839a 100644 --- a/doc/.vale/gitlab/LatinTerms.yml +++ b/doc/.vale/gitlab/LatinTerms.yml @@ -3,7 +3,7 @@ # # Checks for use of latin terms. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: substitution message: 'Use "%s" instead of "%s", but consider rewriting the sentence.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#language diff --git a/doc/.vale/gitlab/MeaningfulLinkWords.yml b/doc/.vale/gitlab/MeaningfulLinkWords.yml index 1931112ab3e..4a255e5aae4 100644 --- a/doc/.vale/gitlab/MeaningfulLinkWords.yml +++ b/doc/.vale/gitlab/MeaningfulLinkWords.yml @@ -3,7 +3,7 @@ # # Checks for the presence of semantically unhelpful words in link text. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Improve SEO and accessibility by rewriting "%s" in the link text.' level: warning diff --git a/doc/.vale/gitlab/MergeConflictMarkers.yml b/doc/.vale/gitlab/MergeConflictMarkers.yml index 4d733c856e5..4f216ac34c5 100644 --- a/doc/.vale/gitlab/MergeConflictMarkers.yml +++ b/doc/.vale/gitlab/MergeConflictMarkers.yml @@ -3,7 +3,7 @@ # # Checks for the presence of merge conflict markers. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Merge conflict marker "%s" found.' link: https://docs.gitlab.com/ee/development/code_review.html#merging-a-merge-request diff --git a/doc/.vale/gitlab/OxfordComma.yml b/doc/.vale/gitlab/OxfordComma.yml index e04d209d960..334db5d0388 100644 --- a/doc/.vale/gitlab/OxfordComma.yml +++ b/doc/.vale/gitlab/OxfordComma.yml @@ -4,7 +4,7 @@ # Checks for the lack of an Oxford comma. In some cases, will catch overly # complex sentence structures with lots of commas. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Use a comma before the last "and" or "or" in a list of four or more items.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#punctuation diff --git a/doc/.vale/gitlab/ReferenceLinks.yml b/doc/.vale/gitlab/ReferenceLinks.yml index 8a3b6940187..49e6ed5a531 100644 --- a/doc/.vale/gitlab/ReferenceLinks.yml +++ b/doc/.vale/gitlab/ReferenceLinks.yml @@ -3,7 +3,7 @@ # # Checks for the presence of reference-style links that must be inline. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Link "%s" must be inline.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#basic-link-criteria diff --git a/doc/.vale/gitlab/RelativeLinks.yml b/doc/.vale/gitlab/RelativeLinks.yml index de24d0608e7..f7407375b84 100644 --- a/doc/.vale/gitlab/RelativeLinks.yml +++ b/doc/.vale/gitlab/RelativeLinks.yml @@ -3,7 +3,7 @@ # # Checks for the presence of absolute hyperlinks that should be relative. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: 'Link "%s" must be relative.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#links-to-internal-documentation diff --git a/doc/.vale/gitlab/Repetition.yml b/doc/.vale/gitlab/Repetition.yml index 76afb7bb5ab..c4b0cc14192 100644 --- a/doc/.vale/gitlab/Repetition.yml +++ b/doc/.vale/gitlab/Repetition.yml @@ -3,7 +3,7 @@ # # Checks for duplicate words, like `the the` or `and and`. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: repetition message: '"%s" is repeated.' level: error diff --git a/doc/.vale/gitlab/SentenceLength.yml b/doc/.vale/gitlab/SentenceLength.yml index b19b76723a6..da9fa052584 100644 --- a/doc/.vale/gitlab/SentenceLength.yml +++ b/doc/.vale/gitlab/SentenceLength.yml @@ -3,7 +3,7 @@ # # Counts words in a sentence and alerts if a sentence exceeds 25 words. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: occurrence message: 'Shorter sentences improve readability (max 25 words).' scope: sentence diff --git a/doc/.vale/gitlab/SentenceSpacing.yml b/doc/.vale/gitlab/SentenceSpacing.yml index c460ef3ae65..3ce0f453f93 100644 --- a/doc/.vale/gitlab/SentenceSpacing.yml +++ b/doc/.vale/gitlab/SentenceSpacing.yml @@ -6,7 +6,7 @@ # - No spaces. # - More than one space. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: '"%s" must contain one and only one space.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#punctuation diff --git a/doc/.vale/gitlab/Spelling.yml b/doc/.vale/gitlab/Spelling.yml index 7bf0f085f5c..602b7cd11e6 100644 --- a/doc/.vale/gitlab/Spelling.yml +++ b/doc/.vale/gitlab/Spelling.yml @@ -9,7 +9,7 @@ # Commands, like `git clone` must use backticks, and must not be added to the # exceptions. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: spelling message: 'Spelling check: "%s"?' level: warning diff --git a/doc/.vale/gitlab/SubstitutionWarning.yml b/doc/.vale/gitlab/SubstitutionWarning.yml index 8c5f7705417..31fbb314801 100644 --- a/doc/.vale/gitlab/SubstitutionWarning.yml +++ b/doc/.vale/gitlab/SubstitutionWarning.yml @@ -4,7 +4,7 @@ # Warns against using common shorthand for terms. # For substitutions flagged as errors, see Substitutions.yml # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: substitution message: 'If possible, use "%s" instead of "%s".' link: https://about.gitlab.com/handbook/communication/#top-misused-terms diff --git a/doc/.vale/gitlab/Substitutions.yml b/doc/.vale/gitlab/Substitutions.yml index 156ff3a53f0..77536ea0b33 100644 --- a/doc/.vale/gitlab/Substitutions.yml +++ b/doc/.vale/gitlab/Substitutions.yml @@ -4,7 +4,7 @@ # Checks for use of some of the top misused terms at GitLab. # For substitutions only flagged as warnings, see SubstitutionWarning.yml # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: substitution message: 'Use "%s" instead of "%s".' link: https://about.gitlab.com/handbook/communication/#top-misused-terms diff --git a/doc/.vale/gitlab/VersionText.yml b/doc/.vale/gitlab/VersionText.yml index 9a05103cc39..3723170b169 100644 --- a/doc/.vale/gitlab/VersionText.yml +++ b/doc/.vale/gitlab/VersionText.yml @@ -13,7 +13,7 @@ # immediately on the next line is ok. However, this will often highlight where multi-line version # text is attempted without `-` characters. # -# For a list of all options, see https://errata-ai.github.io/vale/styles/ +# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles extends: existence message: '"%s" is not formatted correctly.' link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#text-for-documentation-requiring-version-text diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql index baac7b700c2..382501bf576 100644 --- a/doc/api/graphql/reference/gitlab_schema.graphql +++ b/doc/api/graphql/reference/gitlab_schema.graphql @@ -3424,7 +3424,7 @@ type Epic implements Noteable { last: Int """ - Filter epics by title and description + Search query for epic title or description """ search: String @@ -4701,7 +4701,7 @@ type Group { labelName: [String!] """ - Filter epics by title and description + Search query for epic title or description """ search: String @@ -4778,7 +4778,7 @@ type Group { last: Int """ - Filter epics by title and description + Search query for epic title or description """ search: String @@ -4899,7 +4899,7 @@ type Group { milestoneTitle: [String] """ - Search query for finding issues by title or description + Search query for issue title or description """ search: String @@ -8730,7 +8730,7 @@ type Project { name: String """ - Search query + Search query for environment name """ search: String @@ -8830,7 +8830,7 @@ type Project { milestoneTitle: [String] """ - Search query for finding issues by title or description + Search query for issue title or description """ search: String @@ -8930,7 +8930,7 @@ type Project { milestoneTitle: [String] """ - Search query for finding issues by title or description + Search query for issue title or description """ search: String @@ -9338,7 +9338,7 @@ type Project { iids: [ID!] """ - Filter requirements by title search + Search query for requirement title """ search: String @@ -9398,7 +9398,7 @@ type Project { last: Int """ - Filter requirements by title search + Search query for requirement title """ search: String @@ -10089,7 +10089,7 @@ type Query { membership: Boolean """ - Search criteria + Search query for project name, path, or description """ search: String ): ProjectConnection @@ -11440,7 +11440,7 @@ type SentryErrorCollection { last: Int """ - Search term for the Sentry error. + Search query for the Sentry error details """ searchTerm: String diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json index f44bc823df1..4fc62aa489d 100644 --- a/doc/api/graphql/reference/gitlab_schema.json +++ b/doc/api/graphql/reference/gitlab_schema.json @@ -9497,7 +9497,7 @@ }, { "name": "search", - "description": "Filter epics by title and description", + "description": "Search query for epic title or description", "type": { "kind": "SCALAR", "name": "String", @@ -13076,7 +13076,7 @@ }, { "name": "search", - "description": "Filter epics by title and description", + "description": "Search query for epic title or description", "type": { "kind": "SCALAR", "name": "String", @@ -13205,7 +13205,7 @@ }, { "name": "search", - "description": "Filter epics by title and description", + "description": "Search query for epic title or description", "type": { "kind": "SCALAR", "name": "String", @@ -13544,7 +13544,7 @@ }, { "name": "search", - "description": "Search query for finding issues by title or description", + "description": "Search query for issue title or description", "type": { "kind": "SCALAR", "name": "String", @@ -25957,7 +25957,7 @@ }, { "name": "search", - "description": "Search query", + "description": "Search query for environment name", "type": { "kind": "SCALAR", "name": "String", @@ -26294,7 +26294,7 @@ }, { "name": "search", - "description": "Search query for finding issues by title or description", + "description": "Search query for issue title or description", "type": { "kind": "SCALAR", "name": "String", @@ -26473,7 +26473,7 @@ }, { "name": "search", - "description": "Search query for finding issues by title or description", + "description": "Search query for issue title or description", "type": { "kind": "SCALAR", "name": "String", @@ -27483,7 +27483,7 @@ }, { "name": "search", - "description": "Filter requirements by title search", + "description": "Search query for requirement title", "type": { "kind": "SCALAR", "name": "String", @@ -27586,7 +27586,7 @@ }, { "name": "search", - "description": "Filter requirements by title search", + "description": "Search query for requirement title", "type": { "kind": "SCALAR", "name": "String", @@ -29710,7 +29710,7 @@ }, { "name": "search", - "description": "Search criteria", + "description": "Search query for project name, path, or description", "type": { "kind": "SCALAR", "name": "String", @@ -33629,7 +33629,7 @@ }, { "name": "searchTerm", - "description": "Search term for the Sentry error.", + "description": "Search query for the Sentry error details", "type": { "kind": "SCALAR", "name": "String", diff --git a/doc/ci/environments/index.md b/doc/ci/environments/index.md index 84480b836f8..8866a7c9306 100644 --- a/doc/ci/environments/index.md +++ b/doc/ci/environments/index.md @@ -173,8 +173,8 @@ If you want to use the environment URL in GitLab, you would have to update it ma To address this problem, you can configure a deployment job to report back a set of variables, including the URL that was dynamically-generated by the external service. -GitLab supports [dotenv](https://github.com/bkeepers/dotenv) file as the format, -and expands the `environment:url` value with variables defined in the dotenv file. +GitLab supports the [dotenv (`.env`)](https://github.com/bkeepers/dotenv) file format, +and expands the `environment:url` value with variables defined in the `.env` file. To use this feature, specify the [`artifacts:reports:dotenv`](../pipelines/job_artifacts.md#artifactsreportsdotenv) keyword in `.gitlab-ci.yml`. @@ -213,14 +213,13 @@ stop_review: As soon as the `review` job finishes, GitLab updates the `review/your-branch-name` environment's URL. -It parses the report artifact `deploy.env`, registers a list of variables as runtime-created, +It parses the `deploy.env` report artifact, registers a list of variables as runtime-created, uses it for expanding `environment:url: $DYNAMIC_ENVIRONMENT_URL` and sets it to the environment URL. You can also specify a static part of the URL at `environment:url:`, such as `https://$DYNAMIC_ENVIRONMENT_URL`. If the value of `DYNAMIC_ENVIRONMENT_URL` is -`123.awesome.com`, the final result will be `https://123.awesome.com`. +`example.com`, the final result will be `https://example.com`. -The assigned URL for the `review/your-branch-name` environment is visible in the UI. -[See where the environment URL is displayed](#using-the-environment-url). +The assigned URL for the `review/your-branch-name` environment is [visible in the UI](#using-the-environment-url). > **Notes:** > diff --git a/doc/ci/pipelines/job_artifacts.md b/doc/ci/pipelines/job_artifacts.md index 1d60f412e5e..24eab4f5c61 100644 --- a/doc/ci/pipelines/job_artifacts.md +++ b/doc/ci/pipelines/job_artifacts.md @@ -114,14 +114,15 @@ The `dotenv` report collects a set of environment variables as artifacts. The collected variables are registered as runtime-created variables of the job, which is useful to [set dynamic environment URLs after a job finishes](../environments/index.md#set-dynamic-environment-urls-after-a-job-finishes). -There are a couple of limitations on top of the [original dotenv rules](https://github.com/motdotla/dotenv#rules). - -- The variable key can contain only letters, digits and underscore ('_'). -- The size of the dotenv file must be smaller than 5 kilobytes. -- The number of variables must be less than 10. -- It does not support variable substitution in the dotenv file itself. -- It does not support empty lines and comments (`#`) in dotenv file. -- It does not support quote escape, spaces in a quote, a new line expansion in a quote, in dotenv file. +There are a couple of exceptions to the [original dotenv rules](https://github.com/motdotla/dotenv#rules): + +- The variable key can contain only letters, digits, and underscores (`_`). +- The maximum size of the `.env` file is 5 KB. +- The maximum number of variables is 10. +- Variable substitution in the `.env` file is not supported. +- The `.env` file can't have empty lines or comments (starting with `#`). +- Key values in the `env` file cannot have spaces or newline characters (`\n`), including when using single or double quotes. +- Quote escaping during parsing (`key = 'value'` -> `{key: "value"}`) is not supported. #### `artifacts:reports:cobertura` diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md index 0fb8ed8e2c4..d0ea9994ef7 100644 --- a/doc/development/api_graphql_styleguide.md +++ b/doc/development/api_graphql_styleguide.md @@ -1012,6 +1012,34 @@ to make sure the error information we are passing back is useful. See also the [frontend GraphQL guide](../development/fe_guide/graphql.md#handling-errors). +### Aliasing and deprecating mutations + +The `#mount_aliased_mutation` helper allows us to alias a mutation as +another name within `MutationType`. + +For example, to alias a mutation called `FooMutation` as `BarMutation`: + +```ruby +mount_aliased_mutation 'BarMutation', Mutations::FooMutation +``` + +This allows us to rename a mutation and continue to support the old name, +when coupled with the [`deprecated`](#deprecating-fields) argument. + +Example: + +```ruby +mount_aliased_mutation 'UpdateFoo', + Mutations::Foo::Update, + deprecated: { reason: 'Use fooUpdate', milestone: '13.2' } +``` + +Deprecated mutations should be added to `Types::DeprecatedMutations` and +tested for within the unit test of `Types::MutationType`. The merge request +[!34798](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34798) +can be referred to as an example of this, including the method of testing +deprecated aliased mutations. + ## Validating arguments For validations of single arguments, use the diff --git a/doc/development/feature_flags/controls.md b/doc/development/feature_flags/controls.md index d4d1ec74591..9e7ce74cc0c 100644 --- a/doc/development/feature_flags/controls.md +++ b/doc/development/feature_flags/controls.md @@ -210,11 +210,20 @@ actors. Feature.enabled?(:some_feature, group) ``` -NOTE: - +NOTE: **Note:** **Percentage of time** rollout is not a good idea if what you want is to make sure a feature is always on or off to the users. In that case, **Percentage of actors** rollout is a better method. +Lastly, to verify that the feature is deemed stable in as many cases as possible, +you should fully roll out the feature by enabling the flag **globally** by running: + +```shell +/chatops run feature set some_feature true +``` + +This changes the feature flag state to be **enabled** always, which overrides the +existing gates (e.g. `--group=gitlab-org`) in the above processes. + ### Feature flag change logging Any feature flag change that affects GitLab.com (production) will diff --git a/doc/development/feature_flags/process.md b/doc/development/feature_flags/process.md index 00e9ab72f15..5cc08de159c 100644 --- a/doc/development/feature_flags/process.md +++ b/doc/development/feature_flags/process.md @@ -71,7 +71,9 @@ absolutely no way to use the feature until it is enabled. In order to build a final release and present the feature for self-managed users, the feature flag should be at least defaulted to **on**. If the feature is deemed stable and there is confidence that removing the feature flag is safe, -consider removing the feature flag altogether. +consider removing the feature flag altogether. It's _strongly_ recommended that +the feature flag is [enabled **globally** on **production**](./controls.md#enabling-a-feature-for-gitlabcom) for **at least one day** +before making this decision. Unexpected bugs are sometimes discovered during this period. The process for enabling features that are disabled by default can take 5-6 days from when the merge request is first reviewed to when the change is deployed to diff --git a/doc/user/project/merge_requests/fail_fast_testing.md b/doc/user/project/merge_requests/fail_fast_testing.md index ddd97059a6a..619a6d04577 100644 --- a/doc/user/project/merge_requests/fail_fast_testing.md +++ b/doc/user/project/merge_requests/fail_fast_testing.md @@ -22,6 +22,19 @@ configured to run when changes to Ruby files are detected. By default, it runs i the [`.pre` stage](../../../ci/yaml/README.md#pre-and-post) of a GitLab CI/CD pipeline, before all other stages. +## Example use case + +Fail fast testing is useful when adding new functionality to a project and adding +new automated tests. + +Your project could have hundreds of thousands of tests that take a long time to complete. +You may be confident that a new test will pass, but you have to wait for all the tests +to complete to verify it. This could take an hour or more, even when using parallelization. + +Fail fast testing gives you a faster feedback loop from the pipeline. It lets you +know quickly that the new tests are passing and the new functionality did not break +other tests. + ## Requirements This template requires: diff --git a/spec/frontend/issuables_list/components/issuable_spec.js b/spec/frontend/issuables_list/components/issuable_spec.js index 980def06078..71e2907f7b3 100644 --- a/spec/frontend/issuables_list/components/issuable_spec.js +++ b/spec/frontend/issuables_list/components/issuable_spec.js @@ -1,5 +1,5 @@ import { shallowMount } from '@vue/test-utils'; -import { GlLink } from '@gitlab/ui'; +import { GlLabel } from '@gitlab/ui'; import { TEST_HOST } from 'helpers/test_constants'; import { trimText } from 'helpers/text_helper'; import initUserPopovers from '~/user_popovers'; @@ -8,6 +8,7 @@ import { mergeUrlParams } from '~/lib/utils/url_utility'; import Issuable from '~/issuables_list/components/issuable.vue'; import IssueAssignees from '~/vue_shared/components/issue/issue_assignees.vue'; import { simpleIssue, testAssignees, testLabels } from '../issuable_list_test_data'; +import { isScopedLabel } from '~/lib/utils/common_utils'; jest.mock('~/user_popovers'); @@ -37,13 +38,18 @@ describe('Issuable component', () => { let DateOrig; let wrapper; - const factory = (props = {}) => { + const factory = (props = {}, scopedLabels = false) => { wrapper = shallowMount(Issuable, { propsData: { issuable: simpleIssue, baseUrl: TEST_BASE_URL, ...props, }, + provide: { + glFeatures: { + scopedLabels, + }, + }, }); }; @@ -53,6 +59,7 @@ describe('Issuable component', () => { afterEach(() => { wrapper.destroy(); + wrapper = null; }); beforeAll(() => { @@ -70,8 +77,7 @@ describe('Issuable component', () => { const findMilestone = () => wrapper.find('.js-milestone'); const findMilestoneTooltip = () => findMilestone().attributes('title'); const findDueDate = () => wrapper.find('.js-due-date'); - const findLabelContainer = () => wrapper.find('.js-labels'); - const findLabelLinks = () => findLabelContainer().findAll(GlLink); + const findLabels = () => wrapper.findAll(GlLabel); const findWeight = () => wrapper.find('.js-weight'); const findAssignees = () => wrapper.find(IssueAssignees); const findMergeRequestsCount = () => wrapper.find('.js-merge-requests'); @@ -79,6 +85,8 @@ describe('Issuable component', () => { const findDownvotes = () => wrapper.find('.js-downvotes'); const findNotes = () => wrapper.find('.js-notes'); const findBulkCheckbox = () => wrapper.find('input.selected-issuable'); + const findScopedLabels = () => findLabels().filter(w => isScopedLabel({ title: w.text() })); + const findUnscopedLabels = () => findLabels().filter(w => !isScopedLabel({ title: w.text() })); describe('when mounted', () => { it('initializes user popovers', () => { @@ -90,6 +98,54 @@ describe('Issuable component', () => { }); }); + describe('when scopedLabels feature is available', () => { + beforeEach(() => { + issuable.labels = [...testLabels]; + + factory({ issuable }, true); + }); + + describe('when label is scoped', () => { + it('returns label with correct props', () => { + const scopedLabel = findScopedLabels().at(0); + + expect(scopedLabel.props('scoped')).toBe(true); + }); + }); + + describe('when label is not scoped', () => { + it('returns label with correct props', () => { + const notScopedLabel = findUnscopedLabels().at(0); + + expect(notScopedLabel.props('scoped')).toBe(false); + }); + }); + }); + + describe('when scopedLabels feature is not available', () => { + beforeEach(() => { + issuable.labels = [...testLabels]; + + factory({ issuable }); + }); + + describe('when label is scoped', () => { + it('label scoped props is false', () => { + const scopedLabel = findScopedLabels().at(0); + + expect(scopedLabel.props('scoped')).toBe(false); + }); + }); + + describe('when label is not scoped', () => { + it('label scoped props is false', () => { + const notScopedLabel = findUnscopedLabels().at(0); + + expect(notScopedLabel.props('scoped')).toBe(false); + }); + }); + }); + describe('with simple issuable', () => { beforeEach(() => { Object.assign(issuable, { @@ -113,7 +169,7 @@ describe('Issuable component', () => { ${'task status'} | ${findTaskStatus} ${'milestone'} | ${findMilestone} ${'due date'} | ${findDueDate} - ${'labels'} | ${findLabelContainer} + ${'labels'} | ${findLabels} ${'weight'} | ${findWeight} ${'merge request count'} | ${findMergeRequestsCount} ${'upvotes'} | ${findUpvotes} @@ -239,10 +295,10 @@ describe('Issuable component', () => { it('renders labels', () => { factory({ issuable }); - const labels = findLabelLinks().wrappers.map(label => ({ - href: label.attributes('href'), + const labels = findLabels().wrappers.map(label => ({ + href: label.props('target'), text: label.text(), - tooltip: label.find('span').attributes('title'), + tooltip: label.attributes('description'), })); const expected = testLabels.map(label => ({ diff --git a/spec/models/protectable_dropdown_spec.rb b/spec/models/protectable_dropdown_spec.rb index aca3df9fdde..c51197234ca 100644 --- a/spec/models/protectable_dropdown_spec.rb +++ b/spec/models/protectable_dropdown_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProtectableDropdown do +RSpec.describe ProtectableDropdown do let(:project) { create(:project, :repository) } let(:subject) { described_class.new(project, :branches) } diff --git a/spec/models/protected_branch/merge_access_level_spec.rb b/spec/models/protected_branch/merge_access_level_spec.rb index 39dd586b157..b6c2d527d1b 100644 --- a/spec/models/protected_branch/merge_access_level_spec.rb +++ b/spec/models/protected_branch/merge_access_level_spec.rb @@ -2,6 +2,6 @@ require 'spec_helper' -describe ProtectedBranch::MergeAccessLevel do +RSpec.describe ProtectedBranch::MergeAccessLevel do it { is_expected.to validate_inclusion_of(:access_level).in_array([Gitlab::Access::MAINTAINER, Gitlab::Access::DEVELOPER, Gitlab::Access::NO_ACCESS]) } end diff --git a/spec/models/protected_branch/push_access_level_spec.rb b/spec/models/protected_branch/push_access_level_spec.rb index 628c8d29ecd..77fe9814c86 100644 --- a/spec/models/protected_branch/push_access_level_spec.rb +++ b/spec/models/protected_branch/push_access_level_spec.rb @@ -2,6 +2,6 @@ require 'spec_helper' -describe ProtectedBranch::PushAccessLevel do +RSpec.describe ProtectedBranch::PushAccessLevel do it { is_expected.to validate_inclusion_of(:access_level).in_array([Gitlab::Access::MAINTAINER, Gitlab::Access::DEVELOPER, Gitlab::Access::NO_ACCESS]) } end diff --git a/spec/models/protected_branch_spec.rb b/spec/models/protected_branch_spec.rb index 30fce1cd5c4..a89f8778780 100644 --- a/spec/models/protected_branch_spec.rb +++ b/spec/models/protected_branch_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProtectedBranch do +RSpec.describe ProtectedBranch do subject { build_stubbed(:protected_branch) } describe 'Associations' do diff --git a/spec/models/protected_tag_spec.rb b/spec/models/protected_tag_spec.rb index 79120d17d39..7bc62b1d0e7 100644 --- a/spec/models/protected_tag_spec.rb +++ b/spec/models/protected_tag_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProtectedTag do +RSpec.describe ProtectedTag do describe 'Associations' do it { is_expected.to belong_to(:project) } end diff --git a/spec/models/push_event_payload_spec.rb b/spec/models/push_event_payload_spec.rb index 6b59ee5ee57..32415ef4719 100644 --- a/spec/models/push_event_payload_spec.rb +++ b/spec/models/push_event_payload_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PushEventPayload do +RSpec.describe PushEventPayload do it_behaves_like 'having unique enum values' describe 'saving payloads' do diff --git a/spec/models/push_event_spec.rb b/spec/models/push_event_spec.rb index 5c1802669c1..61e31e7c4e3 100644 --- a/spec/models/push_event_spec.rb +++ b/spec/models/push_event_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PushEvent do +RSpec.describe PushEvent do let(:payload) { PushEventPayload.new } let(:event) do diff --git a/spec/models/readme_blob_spec.rb b/spec/models/readme_blob_spec.rb index 34182fa413f..95622d55254 100644 --- a/spec/models/readme_blob_spec.rb +++ b/spec/models/readme_blob_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ReadmeBlob do +RSpec.describe ReadmeBlob do include FakeBlobHelpers describe 'policy' do diff --git a/spec/models/redirect_route_spec.rb b/spec/models/redirect_route_spec.rb index b9b2873f8f2..c6e35923b89 100644 --- a/spec/models/redirect_route_spec.rb +++ b/spec/models/redirect_route_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe RedirectRoute do +RSpec.describe RedirectRoute do let(:group) { create(:group) } let!(:redirect_route) { group.redirect_routes.create(path: 'gitlabb') } diff --git a/spec/models/releases/evidence_spec.rb b/spec/models/releases/evidence_spec.rb index 927e2e9bbe6..ca5d4b67b59 100644 --- a/spec/models/releases/evidence_spec.rb +++ b/spec/models/releases/evidence_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Releases::Evidence do +RSpec.describe Releases::Evidence do let_it_be(:project) { create(:project) } let(:release) { create(:release, project: project) } diff --git a/spec/models/releases/link_spec.rb b/spec/models/releases/link_spec.rb index 7533d1e6e5c..4dc1e53d59e 100644 --- a/spec/models/releases/link_spec.rb +++ b/spec/models/releases/link_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Releases::Link do +RSpec.describe Releases::Link do let(:release) { create(:release, project: project) } let(:project) { create(:project) } diff --git a/spec/models/releases/source_spec.rb b/spec/models/releases/source_spec.rb index d7af6fd90a6..d10b2140550 100644 --- a/spec/models/releases/source_spec.rb +++ b/spec/models/releases/source_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Releases::Source do +RSpec.describe Releases::Source do let_it_be(:project) { create(:project, :repository, name: 'finance-cal') } let(:tag_name) { 'v1.0' } diff --git a/spec/models/remote_mirror_spec.rb b/spec/models/remote_mirror_spec.rb index 6d163a16e63..ebc9760ab14 100644 --- a/spec/models/remote_mirror_spec.rb +++ b/spec/models/remote_mirror_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe RemoteMirror, :mailer do +RSpec.describe RemoteMirror, :mailer do include GitHelpers describe 'URL validation' do diff --git a/spec/models/repository_language_spec.rb b/spec/models/repository_language_spec.rb index 13a4cd1e7cf..8cf5e17086d 100644 --- a/spec/models/repository_language_spec.rb +++ b/spec/models/repository_language_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe RepositoryLanguage do +RSpec.describe RepositoryLanguage do let(:repository_language) { build(:repository_language) } describe 'associations' do diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index a9021e5771c..e5d94563b5a 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Repository do +RSpec.describe Repository do include RepoHelpers include GitHelpers diff --git a/spec/models/resource_milestone_event_spec.rb b/spec/models/resource_milestone_event_spec.rb index 66686ec77d0..76ffb358d80 100644 --- a/spec/models/resource_milestone_event_spec.rb +++ b/spec/models/resource_milestone_event_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ResourceMilestoneEvent, type: :model do +RSpec.describe ResourceMilestoneEvent, type: :model do it_behaves_like 'a resource event' it_behaves_like 'a resource event for issues' it_behaves_like 'a resource event for merge requests' diff --git a/spec/models/resource_state_event_spec.rb b/spec/models/resource_state_event_spec.rb index 986a13cbd0d..1381b45cf9e 100644 --- a/spec/models/resource_state_event_spec.rb +++ b/spec/models/resource_state_event_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ResourceStateEvent, type: :model do +RSpec.describe ResourceStateEvent, type: :model do subject { build(:resource_state_event, issue: issue) } let(:issue) { create(:issue) } diff --git a/spec/models/review_spec.rb b/spec/models/review_spec.rb index 9dd8b90feee..2683dc93a4b 100644 --- a/spec/models/review_spec.rb +++ b/spec/models/review_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Review do +RSpec.describe Review do describe 'associations' do it { is_expected.to belong_to(:author).class_name('User').with_foreign_key(:author_id).inverse_of(:reviews) } it { is_expected.to belong_to(:merge_request).inverse_of(:reviews).touch(false) } diff --git a/spec/models/route_spec.rb b/spec/models/route_spec.rb index 20289afbeb5..0f1637016d6 100644 --- a/spec/models/route_spec.rb +++ b/spec/models/route_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Route do +RSpec.describe Route do let(:group) { create(:group, path: 'git_lab', name: 'git_lab') } let(:route) { group.route } diff --git a/spec/models/sent_notification_spec.rb b/spec/models/sent_notification_spec.rb index 087bc957373..aeafb49f8b5 100644 --- a/spec/models/sent_notification_spec.rb +++ b/spec/models/sent_notification_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SentNotification do +RSpec.describe SentNotification do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } diff --git a/spec/models/sentry_issue_spec.rb b/spec/models/sentry_issue_spec.rb index b4c1cf57761..33654bf5e1a 100644 --- a/spec/models/sentry_issue_spec.rb +++ b/spec/models/sentry_issue_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SentryIssue do +RSpec.describe SentryIssue do describe 'associations' do it { is_expected.to belong_to(:issue) } end diff --git a/spec/models/serverless/domain_cluster_spec.rb b/spec/models/serverless/domain_cluster_spec.rb index f5e1eb304a1..fdae0483c19 100644 --- a/spec/models/serverless/domain_cluster_spec.rb +++ b/spec/models/serverless/domain_cluster_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ::Serverless::DomainCluster do +RSpec.describe ::Serverless::DomainCluster do subject { create(:serverless_domain_cluster) } describe 'validations' do diff --git a/spec/models/serverless/domain_spec.rb b/spec/models/serverless/domain_spec.rb index ba54e05b4e3..f997b28b149 100644 --- a/spec/models/serverless/domain_spec.rb +++ b/spec/models/serverless/domain_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ::Serverless::Domain do +RSpec.describe ::Serverless::Domain do let(:function_name) { 'test-function' } let(:pages_domain_name) { 'serverless.gitlab.io' } let(:pages_domain) { create(:pages_domain, :instance_serverless, domain: pages_domain_name) } diff --git a/spec/models/serverless/function_spec.rb b/spec/models/serverless/function_spec.rb index 810d4409a34..632f5eba5c3 100644 --- a/spec/models/serverless/function_spec.rb +++ b/spec/models/serverless/function_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ::Serverless::Function do +RSpec.describe ::Serverless::Function do let(:project) { create(:project) } let(:func) { described_class.new(project, 'test', 'test-ns') } diff --git a/spec/models/shard_spec.rb b/spec/models/shard_spec.rb index 4da86858b54..a9d11f4290c 100644 --- a/spec/models/shard_spec.rb +++ b/spec/models/shard_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Shard do +RSpec.describe Shard do describe '.populate!' do it 'creates shards based on the config file' do expect(described_class.all).to be_empty diff --git a/spec/models/snippet_blob_spec.rb b/spec/models/snippet_blob_spec.rb index 88441e39d45..19b985f66ee 100644 --- a/spec/models/snippet_blob_spec.rb +++ b/spec/models/snippet_blob_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SnippetBlob do +RSpec.describe SnippetBlob do let(:snippet) { create(:snippet) } subject { described_class.new(snippet) } diff --git a/spec/models/snippet_input_action_collection_spec.rb b/spec/models/snippet_input_action_collection_spec.rb index ef18ab5a810..3ec206bd031 100644 --- a/spec/models/snippet_input_action_collection_spec.rb +++ b/spec/models/snippet_input_action_collection_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SnippetInputActionCollection do +RSpec.describe SnippetInputActionCollection do let(:action_name) { 'create' } let(:action) { { action: action_name, file_path: 'foo', content: 'bar', previous_path: 'foobar' } } let(:data) { [action, action] } diff --git a/spec/models/snippet_input_action_spec.rb b/spec/models/snippet_input_action_spec.rb index 87ce2dac8ba..43c2919735b 100644 --- a/spec/models/snippet_input_action_spec.rb +++ b/spec/models/snippet_input_action_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SnippetInputAction do +RSpec.describe SnippetInputAction do describe 'validations' do using RSpec::Parameterized::TableSyntax diff --git a/spec/models/snippet_repository_spec.rb b/spec/models/snippet_repository_spec.rb index b86a6f82f07..8c25d713c0a 100644 --- a/spec/models/snippet_repository_spec.rb +++ b/spec/models/snippet_repository_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SnippetRepository do +RSpec.describe SnippetRepository do let_it_be(:user) { create(:user) } let(:snippet) { create(:personal_snippet, :repository, author: user) } let(:snippet_repository) { snippet.snippet_repository } diff --git a/spec/models/snippet_spec.rb b/spec/models/snippet_spec.rb index 7ded8c380fe..d37fee60bea 100644 --- a/spec/models/snippet_spec.rb +++ b/spec/models/snippet_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Snippet do +RSpec.describe Snippet do describe 'modules' do subject { described_class } diff --git a/spec/models/spam_log_spec.rb b/spec/models/spam_log_spec.rb index 8d0f247b5d6..97a0dc27f17 100644 --- a/spec/models/spam_log_spec.rb +++ b/spec/models/spam_log_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SpamLog do +RSpec.describe SpamLog do let_it_be(:admin) { create(:admin) } describe 'associations' do diff --git a/spec/models/ssh_host_key_spec.rb b/spec/models/ssh_host_key_spec.rb index a17cd8ba345..4d729d5585f 100644 --- a/spec/models/ssh_host_key_spec.rb +++ b/spec/models/ssh_host_key_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SshHostKey do +RSpec.describe SshHostKey do using RSpec::Parameterized::TableSyntax include ReactiveCachingHelpers diff --git a/spec/models/state_note_spec.rb b/spec/models/state_note_spec.rb index d3409315e41..5249c1be9ca 100644 --- a/spec/models/state_note_spec.rb +++ b/spec/models/state_note_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe StateNote do +RSpec.describe StateNote do describe '.from_event' do let_it_be(:author) { create(:user) } let_it_be(:project) { create(:project, :repository) } diff --git a/spec/models/subscription_spec.rb b/spec/models/subscription_spec.rb index 41bd48810b2..be85e6e10f4 100644 --- a/spec/models/subscription_spec.rb +++ b/spec/models/subscription_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Subscription do +RSpec.describe Subscription do describe 'relationships' do it { is_expected.to belong_to(:project) } it { is_expected.to belong_to(:subscribable) } diff --git a/spec/models/suggestion_spec.rb b/spec/models/suggestion_spec.rb index 2ac3ae0a5ad..6a7e187f4f4 100644 --- a/spec/models/suggestion_spec.rb +++ b/spec/models/suggestion_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Suggestion do +RSpec.describe Suggestion do let(:suggestion) { create(:suggestion) } describe 'associations' do diff --git a/spec/models/system_note_metadata_spec.rb b/spec/models/system_note_metadata_spec.rb index 801f139355b..9a6b57afb97 100644 --- a/spec/models/system_note_metadata_spec.rb +++ b/spec/models/system_note_metadata_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SystemNoteMetadata do +RSpec.describe SystemNoteMetadata do describe 'associations' do it { is_expected.to belong_to(:note) } it { is_expected.to belong_to(:description_version) } diff --git a/spec/models/term_agreement_spec.rb b/spec/models/term_agreement_spec.rb index 42a48048b67..98c7a2daadd 100644 --- a/spec/models/term_agreement_spec.rb +++ b/spec/models/term_agreement_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TermAgreement do +RSpec.describe TermAgreement do describe 'validations' do it { is_expected.to validate_presence_of(:term) } it { is_expected.to validate_presence_of(:user) } diff --git a/spec/models/terraform/state_spec.rb b/spec/models/terraform/state_spec.rb index 3cd15e23ee2..00e67ad70db 100644 --- a/spec/models/terraform/state_spec.rb +++ b/spec/models/terraform/state_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Terraform::State do +RSpec.describe Terraform::State do subject { create(:terraform_state, :with_file) } let(:terraform_state_file) { fixture_file('terraform/terraform.tfstate') } diff --git a/spec/models/todo_spec.rb b/spec/models/todo_spec.rb index bda89fc01f3..44e81455a67 100644 --- a/spec/models/todo_spec.rb +++ b/spec/models/todo_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Todo do +RSpec.describe Todo do let(:issue) { create(:issue) } describe 'relationships' do diff --git a/spec/models/tree_spec.rb b/spec/models/tree_spec.rb index 7dde8459f9a..1522d836f76 100644 --- a/spec/models/tree_spec.rb +++ b/spec/models/tree_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Tree do +RSpec.describe Tree do let(:repository) { create(:project, :repository).repository } let(:sha) { repository.root_ref } diff --git a/spec/models/trending_project_spec.rb b/spec/models/trending_project_spec.rb index 39f5d686eb4..802f8befbcd 100644 --- a/spec/models/trending_project_spec.rb +++ b/spec/models/trending_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TrendingProject do +RSpec.describe TrendingProject do let(:user) { create(:user) } let(:public_project1) { create(:project, :public, :repository) } let(:public_project2) { create(:project, :public, :repository) } diff --git a/spec/models/upload_spec.rb b/spec/models/upload_spec.rb index 8a64948d570..18388b4cd83 100644 --- a/spec/models/upload_spec.rb +++ b/spec/models/upload_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Upload do +RSpec.describe Upload do describe 'associations' do it { is_expected.to belong_to(:model) } end diff --git a/spec/models/uploads/fog_spec.rb b/spec/models/uploads/fog_spec.rb index 72a169280af..899e6f2064c 100644 --- a/spec/models/uploads/fog_spec.rb +++ b/spec/models/uploads/fog_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Uploads::Fog do +RSpec.describe Uploads::Fog do let(:data_store) { described_class.new } before do diff --git a/spec/models/uploads/local_spec.rb b/spec/models/uploads/local_spec.rb index 374c3019edc..d354b252b39 100644 --- a/spec/models/uploads/local_spec.rb +++ b/spec/models/uploads/local_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Uploads::Local do +RSpec.describe Uploads::Local do let(:data_store) { described_class.new } before do diff --git a/spec/models/user_agent_detail_spec.rb b/spec/models/user_agent_detail_spec.rb index 5c28511b446..e3f3d9c342b 100644 --- a/spec/models/user_agent_detail_spec.rb +++ b/spec/models/user_agent_detail_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserAgentDetail do +RSpec.describe UserAgentDetail do describe '.submittable?' do it 'is submittable when not already submitted' do detail = build(:user_agent_detail) diff --git a/spec/models/user_callout_spec.rb b/spec/models/user_callout_spec.rb index a084b1ac662..cdf70dd5190 100644 --- a/spec/models/user_callout_spec.rb +++ b/spec/models/user_callout_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserCallout do +RSpec.describe UserCallout do let!(:callout) { create(:user_callout) } it_behaves_like 'having unique enum values' diff --git a/spec/models/user_canonical_email_spec.rb b/spec/models/user_canonical_email_spec.rb index 54a4e968033..8e26f68c09b 100644 --- a/spec/models/user_canonical_email_spec.rb +++ b/spec/models/user_canonical_email_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserCanonicalEmail do +RSpec.describe UserCanonicalEmail do it { is_expected.to belong_to(:user) } describe 'validations' do diff --git a/spec/models/user_custom_attribute_spec.rb b/spec/models/user_custom_attribute_spec.rb index d0981b2d771..1a51ad662b0 100644 --- a/spec/models/user_custom_attribute_spec.rb +++ b/spec/models/user_custom_attribute_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserCustomAttribute do +RSpec.describe UserCustomAttribute do describe 'assocations' do it { is_expected.to belong_to(:user) } end diff --git a/spec/models/user_detail_spec.rb b/spec/models/user_detail_spec.rb index 2b2bfff7be2..407b82a7ac3 100644 --- a/spec/models/user_detail_spec.rb +++ b/spec/models/user_detail_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserDetail do +RSpec.describe UserDetail do it { is_expected.to belong_to(:user) } describe 'validations' do diff --git a/spec/models/user_highest_role_spec.rb b/spec/models/user_highest_role_spec.rb index b3c795f6623..3ae672cf7f7 100644 --- a/spec/models/user_highest_role_spec.rb +++ b/spec/models/user_highest_role_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserHighestRole do +RSpec.describe UserHighestRole do describe 'associations' do it { is_expected.to belong_to(:user).required } end diff --git a/spec/models/user_interacted_project_spec.rb b/spec/models/user_interacted_project_spec.rb index 83c66bf1969..2fec8be76e8 100644 --- a/spec/models/user_interacted_project_spec.rb +++ b/spec/models/user_interacted_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserInteractedProject do +RSpec.describe UserInteractedProject do describe '.track' do subject { described_class.track(event) } diff --git a/spec/models/user_mentions/commit_user_mention_spec.rb b/spec/models/user_mentions/commit_user_mention_spec.rb index ebad3902d6b..91d28241650 100644 --- a/spec/models/user_mentions/commit_user_mention_spec.rb +++ b/spec/models/user_mentions/commit_user_mention_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe CommitUserMention do +RSpec.describe CommitUserMention do describe 'associations' do it { is_expected.to belong_to(:note) } end diff --git a/spec/models/user_mentions/issue_user_mention_spec.rb b/spec/models/user_mentions/issue_user_mention_spec.rb index ac29f3084b4..6faf598ee36 100644 --- a/spec/models/user_mentions/issue_user_mention_spec.rb +++ b/spec/models/user_mentions/issue_user_mention_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IssueUserMention do +RSpec.describe IssueUserMention do describe 'associations' do it { is_expected.to belong_to(:issue) } it { is_expected.to belong_to(:note) } diff --git a/spec/models/user_mentions/merge_request_user_mention_spec.rb b/spec/models/user_mentions/merge_request_user_mention_spec.rb index c5c7cebfaa5..10fcb126965 100644 --- a/spec/models/user_mentions/merge_request_user_mention_spec.rb +++ b/spec/models/user_mentions/merge_request_user_mention_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestUserMention do +RSpec.describe MergeRequestUserMention do describe 'associations' do it { is_expected.to belong_to(:merge_request) } it { is_expected.to belong_to(:note) } diff --git a/spec/models/user_mentions/snippet_user_mention_spec.rb b/spec/models/user_mentions/snippet_user_mention_spec.rb index 0e34a2dd5a1..0762e731a53 100644 --- a/spec/models/user_mentions/snippet_user_mention_spec.rb +++ b/spec/models/user_mentions/snippet_user_mention_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SnippetUserMention do +RSpec.describe SnippetUserMention do describe 'associations' do it { is_expected.to belong_to(:snippet) } it { is_expected.to belong_to(:note) } diff --git a/spec/models/user_preference_spec.rb b/spec/models/user_preference_spec.rb index cf32d4eeca7..27ddaea763d 100644 --- a/spec/models/user_preference_spec.rb +++ b/spec/models/user_preference_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserPreference do +RSpec.describe UserPreference do let(:user_preference) { create(:user_preference) } describe 'notes filters global keys' do diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 3180651309e..01a908a34d7 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe User do +RSpec.describe User do include ProjectForksHelper include TermsHelper include ExclusiveLeaseHelpers diff --git a/spec/models/user_status_spec.rb b/spec/models/user_status_spec.rb index fcc01cdae3d..2c0664bd165 100644 --- a/spec/models/user_status_spec.rb +++ b/spec/models/user_status_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserStatus do +RSpec.describe UserStatus do it { is_expected.to validate_presence_of(:user) } it { is_expected.to allow_value('smirk').for(:emoji) } diff --git a/spec/models/users_statistics_spec.rb b/spec/models/users_statistics_spec.rb index 4437a5469c6..b4b7ddb7c63 100644 --- a/spec/models/users_statistics_spec.rb +++ b/spec/models/users_statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UsersStatistics do +RSpec.describe UsersStatistics do let(:users_statistics) { build(:users_statistics) } describe 'scopes' do diff --git a/spec/models/web_ide_terminal_spec.rb b/spec/models/web_ide_terminal_spec.rb index 4103a26c75a..149fce33f43 100644 --- a/spec/models/web_ide_terminal_spec.rb +++ b/spec/models/web_ide_terminal_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe WebIdeTerminal do +RSpec.describe WebIdeTerminal do let(:build) { create(:ci_build) } subject { described_class.new(build) } diff --git a/spec/models/wiki_page/meta_spec.rb b/spec/models/wiki_page/meta_spec.rb index 0255dd802cf..aaac72cbc68 100644 --- a/spec/models/wiki_page/meta_spec.rb +++ b/spec/models/wiki_page/meta_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe WikiPage::Meta do +RSpec.describe WikiPage::Meta do let_it_be(:project) { create(:project, :wiki_repo) } let_it_be(:other_project) { create(:project) } diff --git a/spec/models/wiki_page/slug_spec.rb b/spec/models/wiki_page/slug_spec.rb index 324dea6b320..cf256c67277 100644 --- a/spec/models/wiki_page/slug_spec.rb +++ b/spec/models/wiki_page/slug_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe WikiPage::Slug do +RSpec.describe WikiPage::Slug do let_it_be(:meta) { create(:wiki_page_meta) } describe 'Associations' do diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb index 8f2da8ff9a1..68446db7a10 100644 --- a/spec/models/wiki_page_spec.rb +++ b/spec/models/wiki_page_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe WikiPage do +RSpec.describe WikiPage do let_it_be(:user) { create(:user) } let(:container) { create(:project, :wiki_repo) } let(:wiki) { Wiki.for_container(container, user) } diff --git a/spec/models/zoom_meeting_spec.rb b/spec/models/zoom_meeting_spec.rb index 3dad957a1ce..00a0f92e848 100644 --- a/spec/models/zoom_meeting_spec.rb +++ b/spec/models/zoom_meeting_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ZoomMeeting do +RSpec.describe ZoomMeeting do let(:project) { build(:project) } describe 'Factory' do diff --git a/spec/policies/alert_management/alert_policy_spec.rb b/spec/policies/alert_management/alert_policy_spec.rb index 0d7624a0142..3e08d8b4ccc 100644 --- a/spec/policies/alert_management/alert_policy_spec.rb +++ b/spec/policies/alert_management/alert_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AlertManagement::AlertPolicy, :models do +RSpec.describe AlertManagement::AlertPolicy, :models do let(:alert) { create(:alert_management_alert) } let(:project) { alert.project } let(:user) { create(:user) } diff --git a/spec/policies/application_setting/term_policy_spec.rb b/spec/policies/application_setting/term_policy_spec.rb index 2b5b9758ec2..00b48402fa6 100644 --- a/spec/policies/application_setting/term_policy_spec.rb +++ b/spec/policies/application_setting/term_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ApplicationSetting::TermPolicy do +RSpec.describe ApplicationSetting::TermPolicy do include TermsHelper let_it_be(:term) { create(:term) } diff --git a/spec/policies/award_emoji_policy_spec.rb b/spec/policies/award_emoji_policy_spec.rb index 2e3693c58d7..bd34a656e12 100644 --- a/spec/policies/award_emoji_policy_spec.rb +++ b/spec/policies/award_emoji_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AwardEmojiPolicy do +RSpec.describe AwardEmojiPolicy do let(:user) { create(:user) } let(:award_emoji) { create(:award_emoji, awardable: awardable) } diff --git a/spec/policies/base_policy_spec.rb b/spec/policies/base_policy_spec.rb index 67f7452528a..103f2e9bc39 100644 --- a/spec/policies/base_policy_spec.rb +++ b/spec/policies/base_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BasePolicy do +RSpec.describe BasePolicy do include ExternalAuthorizationServiceHelpers include AdminModeHelper diff --git a/spec/policies/blob_policy_spec.rb b/spec/policies/blob_policy_spec.rb index e48dd751a8f..fc46b25f25c 100644 --- a/spec/policies/blob_policy_spec.rb +++ b/spec/policies/blob_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BlobPolicy, :enable_admin_mode do +RSpec.describe BlobPolicy, :enable_admin_mode do include_context 'ProjectPolicyTable context' include ProjectHelpers using RSpec::Parameterized::TableSyntax diff --git a/spec/policies/board_policy_spec.rb b/spec/policies/board_policy_spec.rb index 35eac8a02c4..6940e75ec37 100644 --- a/spec/policies/board_policy_spec.rb +++ b/spec/policies/board_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BoardPolicy do +RSpec.describe BoardPolicy do let(:user) { create(:user) } let(:project) { create(:project, :private) } let(:group) { create(:group, :private) } diff --git a/spec/policies/ci/build_policy_spec.rb b/spec/policies/ci/build_policy_spec.rb index 5857369a550..d2547338855 100644 --- a/spec/policies/ci/build_policy_spec.rb +++ b/spec/policies/ci/build_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::BuildPolicy do +RSpec.describe Ci::BuildPolicy do let(:user) { create(:user) } let(:build) { create(:ci_build, pipeline: pipeline) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } diff --git a/spec/policies/ci/pipeline_policy_spec.rb b/spec/policies/ci/pipeline_policy_spec.rb index 293fe1fc5b9..fcd96bc6653 100644 --- a/spec/policies/ci/pipeline_policy_spec.rb +++ b/spec/policies/ci/pipeline_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelinePolicy, :models do +RSpec.describe Ci::PipelinePolicy, :models do let(:user) { create(:user) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } diff --git a/spec/policies/ci/pipeline_schedule_policy_spec.rb b/spec/policies/ci/pipeline_schedule_policy_spec.rb index d503401f7cf..b455384d17a 100644 --- a/spec/policies/ci/pipeline_schedule_policy_spec.rb +++ b/spec/policies/ci/pipeline_schedule_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelineSchedulePolicy, :models do +RSpec.describe Ci::PipelineSchedulePolicy, :models do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :repository) } let_it_be(:pipeline_schedule, reload: true) { create(:ci_pipeline_schedule, :nightly, project: project) } diff --git a/spec/policies/ci/trigger_policy_spec.rb b/spec/policies/ci/trigger_policy_spec.rb index 28e5a2b2cd6..b8b54e57035 100644 --- a/spec/policies/ci/trigger_policy_spec.rb +++ b/spec/policies/ci/trigger_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::TriggerPolicy do +RSpec.describe Ci::TriggerPolicy do let(:user) { create(:user) } let(:project) { create(:project) } let(:trigger) { create(:ci_trigger, project: project, owner: create(:user)) } diff --git a/spec/policies/clusters/cluster_policy_spec.rb b/spec/policies/clusters/cluster_policy_spec.rb index 26cfc19862a..0b931c6f927 100644 --- a/spec/policies/clusters/cluster_policy_spec.rb +++ b/spec/policies/clusters/cluster_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::ClusterPolicy, :models do +RSpec.describe Clusters::ClusterPolicy, :models do let(:cluster) { create(:cluster, :project) } let(:project) { cluster.project } let(:user) { create(:user) } diff --git a/spec/policies/clusters/instance_policy_spec.rb b/spec/policies/clusters/instance_policy_spec.rb index dfe480d7fa4..f90841fc311 100644 --- a/spec/policies/clusters/instance_policy_spec.rb +++ b/spec/policies/clusters/instance_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::InstancePolicy do +RSpec.describe Clusters::InstancePolicy do let(:user) { create(:user) } let(:policy) { described_class.new(user, Clusters::Instance.new) } diff --git a/spec/policies/commit_policy_spec.rb b/spec/policies/commit_policy_spec.rb index 40183f51e9e..0d3dcc97565 100644 --- a/spec/policies/commit_policy_spec.rb +++ b/spec/policies/commit_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe CommitPolicy do +RSpec.describe CommitPolicy do describe '#rules' do let(:user) { create(:user) } let(:commit) { project.repository.head_commit } diff --git a/spec/policies/concerns/policy_actor_spec.rb b/spec/policies/concerns/policy_actor_spec.rb index 27db9710a38..7271cbb4a9d 100644 --- a/spec/policies/concerns/policy_actor_spec.rb +++ b/spec/policies/concerns/policy_actor_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PolicyActor do +RSpec.describe PolicyActor do it 'implements all the methods from user' do methods = subject.instance_methods diff --git a/spec/policies/deploy_key_policy_spec.rb b/spec/policies/deploy_key_policy_spec.rb index 545647e2c67..d84b80a8738 100644 --- a/spec/policies/deploy_key_policy_spec.rb +++ b/spec/policies/deploy_key_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DeployKeyPolicy do +RSpec.describe DeployKeyPolicy do subject { described_class.new(current_user, deploy_key) } describe 'updating a deploy_key' do diff --git a/spec/policies/deploy_keys_project_policy_spec.rb b/spec/policies/deploy_keys_project_policy_spec.rb index 952da86b7a7..3be55e9238c 100644 --- a/spec/policies/deploy_keys_project_policy_spec.rb +++ b/spec/policies/deploy_keys_project_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DeployKeysProjectPolicy do +RSpec.describe DeployKeysProjectPolicy do subject { described_class.new(current_user, deploy_key.deploy_keys_project_for(project)) } describe 'updating a deploy_keys_project' do diff --git a/spec/policies/deploy_token_policy_spec.rb b/spec/policies/deploy_token_policy_spec.rb index 43e23ee55ac..f218828052e 100644 --- a/spec/policies/deploy_token_policy_spec.rb +++ b/spec/policies/deploy_token_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DeployTokenPolicy do +RSpec.describe DeployTokenPolicy do let(:current_user) { create(:user) } let(:project) { create(:project) } let(:deploy_token) { create(:deploy_token, projects: [project]) } diff --git a/spec/policies/design_management/design_policy_spec.rb b/spec/policies/design_management/design_policy_spec.rb index a566aecc4b7..5dde5f896c9 100644 --- a/spec/policies/design_management/design_policy_spec.rb +++ b/spec/policies/design_management/design_policy_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe DesignManagement::DesignPolicy do +RSpec.describe DesignManagement::DesignPolicy do include DesignManagementTestHelpers include_context 'ProjectPolicy context' diff --git a/spec/policies/environment_policy_spec.rb b/spec/policies/environment_policy_spec.rb index 75fca464ec8..649b1a770c0 100644 --- a/spec/policies/environment_policy_spec.rb +++ b/spec/policies/environment_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe EnvironmentPolicy do +RSpec.describe EnvironmentPolicy do using RSpec::Parameterized::TableSyntax let(:user) { create(:user) } diff --git a/spec/policies/global_policy_spec.rb b/spec/policies/global_policy_spec.rb index a19ebecac6d..4954eafe338 100644 --- a/spec/policies/global_policy_spec.rb +++ b/spec/policies/global_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GlobalPolicy do +RSpec.describe GlobalPolicy do include TermsHelper let_it_be(:project_bot) { create(:user, :project_bot) } diff --git a/spec/policies/group_member_policy_spec.rb b/spec/policies/group_member_policy_spec.rb index a4f3301a064..4215fa09301 100644 --- a/spec/policies/group_member_policy_spec.rb +++ b/spec/policies/group_member_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupMemberPolicy do +RSpec.describe GroupMemberPolicy do let(:guest) { create(:user) } let(:owner) { create(:user) } let(:group) { create(:group, :private) } diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb index df398963655..44f27f55d0c 100644 --- a/spec/policies/group_policy_spec.rb +++ b/spec/policies/group_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupPolicy do +RSpec.describe GroupPolicy do include_context 'GroupPolicy context' context 'public group with no user' do diff --git a/spec/policies/identity_provider_policy_spec.rb b/spec/policies/identity_provider_policy_spec.rb index 52b6d2c89ba..f6b4e15cff9 100644 --- a/spec/policies/identity_provider_policy_spec.rb +++ b/spec/policies/identity_provider_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IdentityProviderPolicy do +RSpec.describe IdentityProviderPolicy do subject(:policy) { described_class.new(user, provider) } let(:user) { User.new } diff --git a/spec/policies/issuable_policy_spec.rb b/spec/policies/issuable_policy_spec.rb index 18e35308ecd..20eb09e11c9 100644 --- a/spec/policies/issuable_policy_spec.rb +++ b/spec/policies/issuable_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IssuablePolicy, models: true do +RSpec.describe IssuablePolicy, models: true do let(:user) { create(:user) } let(:project) { create(:project, :public) } let(:issue) { create(:issue, project: project) } diff --git a/spec/policies/issue_policy_spec.rb b/spec/policies/issue_policy_spec.rb index 9d52079e4be..b3ca37b17c2 100644 --- a/spec/policies/issue_policy_spec.rb +++ b/spec/policies/issue_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IssuePolicy do +RSpec.describe IssuePolicy do include ExternalAuthorizationServiceHelpers let(:guest) { create(:user) } diff --git a/spec/policies/merge_request_policy_spec.rb b/spec/policies/merge_request_policy_spec.rb index 31ced5db953..50ce1b33d17 100644 --- a/spec/policies/merge_request_policy_spec.rb +++ b/spec/policies/merge_request_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestPolicy do +RSpec.describe MergeRequestPolicy do include ExternalAuthorizationServiceHelpers let(:guest) { create(:user) } diff --git a/spec/policies/metrics/dashboard/annotation_policy_spec.rb b/spec/policies/metrics/dashboard/annotation_policy_spec.rb index 4dc5f4cd0b4..0c59b39ae3e 100644 --- a/spec/policies/metrics/dashboard/annotation_policy_spec.rb +++ b/spec/policies/metrics/dashboard/annotation_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::AnnotationPolicy, :models do +RSpec.describe Metrics::Dashboard::AnnotationPolicy, :models do shared_examples 'metrics dashboard annotation policy' do context 'when guest' do before do diff --git a/spec/policies/namespace/root_storage_statistics_policy_spec.rb b/spec/policies/namespace/root_storage_statistics_policy_spec.rb index 8d53050fffb..e6b58bca4a8 100644 --- a/spec/policies/namespace/root_storage_statistics_policy_spec.rb +++ b/spec/policies/namespace/root_storage_statistics_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Namespace::RootStorageStatisticsPolicy do +RSpec.describe Namespace::RootStorageStatisticsPolicy do using RSpec::Parameterized::TableSyntax describe '#rules' do diff --git a/spec/policies/namespace_policy_spec.rb b/spec/policies/namespace_policy_spec.rb index 01162dc0fc4..f2f411e48d6 100644 --- a/spec/policies/namespace_policy_spec.rb +++ b/spec/policies/namespace_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe NamespacePolicy do +RSpec.describe NamespacePolicy do let(:user) { create(:user) } let(:owner) { create(:user) } let(:admin) { create(:admin) } diff --git a/spec/policies/note_policy_spec.rb b/spec/policies/note_policy_spec.rb index 1e3bd0d9147..a4cc3a1e9af 100644 --- a/spec/policies/note_policy_spec.rb +++ b/spec/policies/note_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe NotePolicy do +RSpec.describe NotePolicy do describe '#rules' do let(:user) { create(:user) } let(:project) { create(:project, :public) } diff --git a/spec/policies/personal_snippet_policy_spec.rb b/spec/policies/personal_snippet_policy_spec.rb index 5fc48717d86..d546805ce01 100644 --- a/spec/policies/personal_snippet_policy_spec.rb +++ b/spec/policies/personal_snippet_policy_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' # Snippet visibility scenarios are included in more details in spec/support/snippet_visibility.rb -describe PersonalSnippetPolicy do +RSpec.describe PersonalSnippetPolicy do let(:regular_user) { create(:user) } let(:external_user) { create(:user, :external) } let(:admin_user) { create(:user, :admin) } diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb index 9c0bbdf91d5..ea01596a9ec 100644 --- a/spec/policies/project_policy_spec.rb +++ b/spec/policies/project_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectPolicy do +RSpec.describe ProjectPolicy do include ExternalAuthorizationServiceHelpers include_context 'ProjectPolicy context' let_it_be(:other_user) { create(:user) } diff --git a/spec/policies/project_snippet_policy_spec.rb b/spec/policies/project_snippet_policy_spec.rb index 3864666f587..bdf9eaedbf1 100644 --- a/spec/policies/project_snippet_policy_spec.rb +++ b/spec/policies/project_snippet_policy_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' # Snippet visibility scenarios are included in more details in spec/support/snippet_visibility.rb -describe ProjectSnippetPolicy do +RSpec.describe ProjectSnippetPolicy do let_it_be(:regular_user) { create(:user) } let_it_be(:other_user) { create(:user) } let_it_be(:external_user) { create(:user, :external) } diff --git a/spec/policies/project_statistics_policy_spec.rb b/spec/policies/project_statistics_policy_spec.rb index 50dfbf7291b..74630dc38ad 100644 --- a/spec/policies/project_statistics_policy_spec.rb +++ b/spec/policies/project_statistics_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectStatisticsPolicy do +RSpec.describe ProjectStatisticsPolicy do using RSpec::Parameterized::TableSyntax describe '#rules' do diff --git a/spec/policies/protected_branch_policy_spec.rb b/spec/policies/protected_branch_policy_spec.rb index ea7fd093e38..bb6dbff18a0 100644 --- a/spec/policies/protected_branch_policy_spec.rb +++ b/spec/policies/protected_branch_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProtectedBranchPolicy do +RSpec.describe ProtectedBranchPolicy do let(:user) { create(:user) } let(:name) { 'feature' } let(:protected_branch) { create(:protected_branch, name: name) } diff --git a/spec/policies/resource_label_event_policy_spec.rb b/spec/policies/resource_label_event_policy_spec.rb index 4db2390c818..eff2b0e1af5 100644 --- a/spec/policies/resource_label_event_policy_spec.rb +++ b/spec/policies/resource_label_event_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ResourceLabelEventPolicy do +RSpec.describe ResourceLabelEventPolicy do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :private) } let_it_be(:issue) { create(:issue, project: project) } diff --git a/spec/policies/todo_policy_spec.rb b/spec/policies/todo_policy_spec.rb index be6fecd1045..b4876baa504 100644 --- a/spec/policies/todo_policy_spec.rb +++ b/spec/policies/todo_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TodoPolicy do +RSpec.describe TodoPolicy do let_it_be(:author) { create(:user) } let_it_be(:user1) { create(:user) } diff --git a/spec/policies/user_policy_spec.rb b/spec/policies/user_policy_spec.rb index 63c4bd05836..1cc3581ebdd 100644 --- a/spec/policies/user_policy_spec.rb +++ b/spec/policies/user_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserPolicy do +RSpec.describe UserPolicy do let(:current_user) { create(:user) } let(:user) { create(:user) } diff --git a/spec/policies/wiki_page_policy_spec.rb b/spec/policies/wiki_page_policy_spec.rb index 0dedccb6e88..093db9f8374 100644 --- a/spec/policies/wiki_page_policy_spec.rb +++ b/spec/policies/wiki_page_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe WikiPagePolicy, :enable_admin_mode do +RSpec.describe WikiPagePolicy, :enable_admin_mode do include_context 'ProjectPolicyTable context' include ProjectHelpers using RSpec::Parameterized::TableSyntax diff --git a/spec/presenters/award_emoji_presenter_spec.rb b/spec/presenters/award_emoji_presenter_spec.rb index e2ada2a3c93..58ee985f165 100644 --- a/spec/presenters/award_emoji_presenter_spec.rb +++ b/spec/presenters/award_emoji_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AwardEmojiPresenter do +RSpec.describe AwardEmojiPresenter do let(:emoji_name) { 'thumbsup' } let(:award_emoji) { build(:award_emoji, name: emoji_name) } let(:presenter) { described_class.new(award_emoji) } diff --git a/spec/presenters/blob_presenter_spec.rb b/spec/presenters/blob_presenter_spec.rb index ee7bfd1256d..bf926ce62b3 100644 --- a/spec/presenters/blob_presenter_spec.rb +++ b/spec/presenters/blob_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BlobPresenter, :seed_helper do +RSpec.describe BlobPresenter, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } let(:git_blob) do diff --git a/spec/presenters/blobs/unfold_presenter_spec.rb b/spec/presenters/blobs/unfold_presenter_spec.rb index 83004809536..4e9f83e8001 100644 --- a/spec/presenters/blobs/unfold_presenter_spec.rb +++ b/spec/presenters/blobs/unfold_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Blobs::UnfoldPresenter do +RSpec.describe Blobs::UnfoldPresenter do include FakeBlobHelpers let(:project) { create(:project, :repository) } diff --git a/spec/presenters/ci/bridge_presenter_spec.rb b/spec/presenters/ci/bridge_presenter_spec.rb index 2a4c40a7eaa..6291c3426e2 100644 --- a/spec/presenters/ci/bridge_presenter_spec.rb +++ b/spec/presenters/ci/bridge_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::BridgePresenter do +RSpec.describe Ci::BridgePresenter do let_it_be(:project) { create(:project) } let_it_be(:pipeline) { create(:ci_pipeline, project: project) } let_it_be(:bridge) { create(:ci_bridge, pipeline: pipeline, status: :failed) } diff --git a/spec/presenters/ci/build_presenter_spec.rb b/spec/presenters/ci/build_presenter_spec.rb index 9cf6eb45c63..8d302b242b3 100644 --- a/spec/presenters/ci/build_presenter_spec.rb +++ b/spec/presenters/ci/build_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::BuildPresenter do +RSpec.describe Ci::BuildPresenter do let(:project) { create(:project) } let(:pipeline) { create(:ci_pipeline, project: project) } let(:build) { create(:ci_build, pipeline: pipeline) } diff --git a/spec/presenters/ci/build_runner_presenter_spec.rb b/spec/presenters/ci/build_runner_presenter_spec.rb index de199d2bff9..ce4c5a2db7d 100644 --- a/spec/presenters/ci/build_runner_presenter_spec.rb +++ b/spec/presenters/ci/build_runner_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::BuildRunnerPresenter do +RSpec.describe Ci::BuildRunnerPresenter do let(:presenter) { described_class.new(build) } let(:archive) { { paths: ['sample.txt'] } } diff --git a/spec/presenters/ci/group_variable_presenter_spec.rb b/spec/presenters/ci/group_variable_presenter_spec.rb index 3b81a425f5b..aaa6410266e 100644 --- a/spec/presenters/ci/group_variable_presenter_spec.rb +++ b/spec/presenters/ci/group_variable_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::GroupVariablePresenter do +RSpec.describe Ci::GroupVariablePresenter do include Gitlab::Routing.url_helpers let(:group) { create(:group) } diff --git a/spec/presenters/ci/legacy_stage_presenter_spec.rb b/spec/presenters/ci/legacy_stage_presenter_spec.rb index ccf4e48de6e..5268ef0f246 100644 --- a/spec/presenters/ci/legacy_stage_presenter_spec.rb +++ b/spec/presenters/ci/legacy_stage_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::LegacyStagePresenter do +RSpec.describe Ci::LegacyStagePresenter do let(:legacy_stage) { create(:ci_stage) } let(:presenter) { described_class.new(legacy_stage) } diff --git a/spec/presenters/ci/pipeline_presenter_spec.rb b/spec/presenters/ci/pipeline_presenter_spec.rb index e8b66682b97..158daad97f5 100644 --- a/spec/presenters/ci/pipeline_presenter_spec.rb +++ b/spec/presenters/ci/pipeline_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelinePresenter do +RSpec.describe Ci::PipelinePresenter do include Gitlab::Routing let(:user) { create(:user) } diff --git a/spec/presenters/ci/trigger_presenter_spec.rb b/spec/presenters/ci/trigger_presenter_spec.rb index 41cb436f928..bac1c94e0b7 100644 --- a/spec/presenters/ci/trigger_presenter_spec.rb +++ b/spec/presenters/ci/trigger_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::TriggerPresenter do +RSpec.describe Ci::TriggerPresenter do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } diff --git a/spec/presenters/ci/variable_presenter_spec.rb b/spec/presenters/ci/variable_presenter_spec.rb index 70cf2f539b6..30fedf78035 100644 --- a/spec/presenters/ci/variable_presenter_spec.rb +++ b/spec/presenters/ci/variable_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::VariablePresenter do +RSpec.describe Ci::VariablePresenter do include Gitlab::Routing.url_helpers let(:project) { create(:project) } diff --git a/spec/presenters/clusterable_presenter_spec.rb b/spec/presenters/clusterable_presenter_spec.rb index 2c0a7f3e9b2..d19abd4e4d8 100644 --- a/spec/presenters/clusterable_presenter_spec.rb +++ b/spec/presenters/clusterable_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ClusterablePresenter do +RSpec.describe ClusterablePresenter do include Gitlab::Routing.url_helpers describe '.fabricate' do diff --git a/spec/presenters/clusters/cluster_presenter_spec.rb b/spec/presenters/clusters/cluster_presenter_spec.rb index 6a1360807b7..ff9963c3ad1 100644 --- a/spec/presenters/clusters/cluster_presenter_spec.rb +++ b/spec/presenters/clusters/cluster_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::ClusterPresenter do +RSpec.describe Clusters::ClusterPresenter do include Gitlab::Routing.url_helpers let(:cluster) { create(:cluster, :provided_by_gcp, :project) } diff --git a/spec/presenters/commit_presenter_spec.rb b/spec/presenters/commit_presenter_spec.rb index bc749acfa3a..bc6be07f415 100644 --- a/spec/presenters/commit_presenter_spec.rb +++ b/spec/presenters/commit_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe CommitPresenter do +RSpec.describe CommitPresenter do let(:project) { create(:project, :repository) } let(:commit) { project.commit } let(:user) { create(:user) } diff --git a/spec/presenters/commit_status_presenter_spec.rb b/spec/presenters/commit_status_presenter_spec.rb index b02497d4c11..4b2441d656e 100644 --- a/spec/presenters/commit_status_presenter_spec.rb +++ b/spec/presenters/commit_status_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe CommitStatusPresenter do +RSpec.describe CommitStatusPresenter do let(:project) { create(:project) } let(:pipeline) { create(:ci_pipeline, project: project) } let(:build) { create(:ci_build, pipeline: pipeline) } diff --git a/spec/presenters/dev_ops_score/metric_presenter_spec.rb b/spec/presenters/dev_ops_score/metric_presenter_spec.rb index b6eab3f2e74..8b7b2c88578 100644 --- a/spec/presenters/dev_ops_score/metric_presenter_spec.rb +++ b/spec/presenters/dev_ops_score/metric_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DevOpsScore::MetricPresenter do +RSpec.describe DevOpsScore::MetricPresenter do subject { described_class.new(metric) } let(:metric) { build(:dev_ops_score_metric) } diff --git a/spec/presenters/event_presenter_spec.rb b/spec/presenters/event_presenter_spec.rb index eb94d838370..2d4872ea29e 100644 --- a/spec/presenters/event_presenter_spec.rb +++ b/spec/presenters/event_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe EventPresenter do +RSpec.describe EventPresenter do include Gitlab::Routing.url_helpers let_it_be(:group) { create(:group) } diff --git a/spec/presenters/group_clusterable_presenter_spec.rb b/spec/presenters/group_clusterable_presenter_spec.rb index d40ca856f7b..3910f4705c5 100644 --- a/spec/presenters/group_clusterable_presenter_spec.rb +++ b/spec/presenters/group_clusterable_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupClusterablePresenter do +RSpec.describe GroupClusterablePresenter do include Gitlab::Routing.url_helpers let(:presenter) { described_class.new(group) } diff --git a/spec/presenters/group_member_presenter_spec.rb b/spec/presenters/group_member_presenter_spec.rb index 382b1881ab7..6bd3005fbb6 100644 --- a/spec/presenters/group_member_presenter_spec.rb +++ b/spec/presenters/group_member_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupMemberPresenter do +RSpec.describe GroupMemberPresenter do let(:user) { double(:user) } let(:group) { double(:group) } let(:group_member) { double(:group_member, source: group) } diff --git a/spec/presenters/instance_clusterable_presenter_spec.rb b/spec/presenters/instance_clusterable_presenter_spec.rb index 4265e2fcb69..352b7fc6ea7 100644 --- a/spec/presenters/instance_clusterable_presenter_spec.rb +++ b/spec/presenters/instance_clusterable_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe InstanceClusterablePresenter do +RSpec.describe InstanceClusterablePresenter do include Gitlab::Routing.url_helpers let(:presenter) { described_class.new(instance) } diff --git a/spec/presenters/issue_presenter_spec.rb b/spec/presenters/issue_presenter_spec.rb index 4a4caef9d28..f08cd0f2026 100644 --- a/spec/presenters/issue_presenter_spec.rb +++ b/spec/presenters/issue_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IssuePresenter do +RSpec.describe IssuePresenter do include Gitlab::Routing.url_helpers let(:user) { create(:user) } diff --git a/spec/presenters/label_presenter_spec.rb b/spec/presenters/label_presenter_spec.rb index 9578d017af5..cb6e991bd8e 100644 --- a/spec/presenters/label_presenter_spec.rb +++ b/spec/presenters/label_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe LabelPresenter do +RSpec.describe LabelPresenter do include Gitlab::Routing.url_helpers let_it_be(:group) { create(:group) } diff --git a/spec/presenters/merge_request_presenter_spec.rb b/spec/presenters/merge_request_presenter_spec.rb index f184e767f8c..e7184d23767 100644 --- a/spec/presenters/merge_request_presenter_spec.rb +++ b/spec/presenters/merge_request_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestPresenter do +RSpec.describe MergeRequestPresenter do let(:resource) { create(:merge_request, source_project: project) } let(:project) { create(:project) } let(:user) { create(:user) } diff --git a/spec/presenters/milestone_presenter_spec.rb b/spec/presenters/milestone_presenter_spec.rb index 3d7b3ad6d78..1f23bb31fda 100644 --- a/spec/presenters/milestone_presenter_spec.rb +++ b/spec/presenters/milestone_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MilestonePresenter do +RSpec.describe MilestonePresenter do let_it_be(:user) { create(:user) } let_it_be(:group) { create(:group) } let_it_be(:milestone) { create(:milestone, group: group) } diff --git a/spec/presenters/pages_domain_presenter_spec.rb b/spec/presenters/pages_domain_presenter_spec.rb index 30ce59b7bfb..731279ce5b9 100644 --- a/spec/presenters/pages_domain_presenter_spec.rb +++ b/spec/presenters/pages_domain_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PagesDomainPresenter do +RSpec.describe PagesDomainPresenter do using RSpec::Parameterized::TableSyntax include LetsEncryptHelpers diff --git a/spec/presenters/project_clusterable_presenter_spec.rb b/spec/presenters/project_clusterable_presenter_spec.rb index b3dad4abde5..6cd06670595 100644 --- a/spec/presenters/project_clusterable_presenter_spec.rb +++ b/spec/presenters/project_clusterable_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectClusterablePresenter do +RSpec.describe ProjectClusterablePresenter do include Gitlab::Routing.url_helpers let(:presenter) { described_class.new(project) } diff --git a/spec/presenters/project_hook_presenter_spec.rb b/spec/presenters/project_hook_presenter_spec.rb index 773e8ccf51e..061ec38ae34 100644 --- a/spec/presenters/project_hook_presenter_spec.rb +++ b/spec/presenters/project_hook_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectHookPresenter do +RSpec.describe ProjectHookPresenter do let(:web_hook_log) { create(:web_hook_log) } let(:project) { web_hook_log.web_hook.project } let(:web_hook) { web_hook_log.web_hook } diff --git a/spec/presenters/project_member_presenter_spec.rb b/spec/presenters/project_member_presenter_spec.rb index 743c89fc7c2..ad45a23c183 100644 --- a/spec/presenters/project_member_presenter_spec.rb +++ b/spec/presenters/project_member_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectMemberPresenter do +RSpec.describe ProjectMemberPresenter do let(:user) { double(:user) } let(:project) { double(:project) } let(:project_member) { double(:project_member, source: project) } diff --git a/spec/presenters/project_presenter_spec.rb b/spec/presenters/project_presenter_spec.rb index 65ae85ea78f..eb1ff628d14 100644 --- a/spec/presenters/project_presenter_spec.rb +++ b/spec/presenters/project_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectPresenter do +RSpec.describe ProjectPresenter do let(:user) { create(:user) } let(:project) { create(:project) } let(:presenter) { described_class.new(project, current_user: user) } diff --git a/spec/presenters/projects/import_export/project_export_presenter_spec.rb b/spec/presenters/projects/import_export/project_export_presenter_spec.rb index 052ca36974a..8463d01d95b 100644 --- a/spec/presenters/projects/import_export/project_export_presenter_spec.rb +++ b/spec/presenters/projects/import_export/project_export_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::ImportExport::ProjectExportPresenter do +RSpec.describe Projects::ImportExport::ProjectExportPresenter do let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project, group: group) } let_it_be(:user) { create(:user) } diff --git a/spec/presenters/projects/prometheus/alert_presenter_spec.rb b/spec/presenters/projects/prometheus/alert_presenter_spec.rb index 8ee5a4d7b3f..e558c651734 100644 --- a/spec/presenters/projects/prometheus/alert_presenter_spec.rb +++ b/spec/presenters/projects/prometheus/alert_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::Prometheus::AlertPresenter do +RSpec.describe Projects::Prometheus::AlertPresenter do let_it_be(:project, reload: true) { create(:project) } let(:presenter) { described_class.new(alert) } diff --git a/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb b/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb index b9cb60e414f..7a679a03b53 100644 --- a/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb +++ b/spec/presenters/projects/settings/deploy_keys_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::Settings::DeployKeysPresenter do +RSpec.describe Projects::Settings::DeployKeysPresenter do let(:project) { create(:project) } let(:user) { create(:user) } diff --git a/spec/presenters/release_presenter_spec.rb b/spec/presenters/release_presenter_spec.rb index 57de99f6a61..5577b3ad2e8 100644 --- a/spec/presenters/release_presenter_spec.rb +++ b/spec/presenters/release_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ReleasePresenter do +RSpec.describe ReleasePresenter do include Gitlab::Routing.url_helpers let_it_be(:project) { create(:project, :repository) } diff --git a/spec/presenters/sentry_error_presenter_spec.rb b/spec/presenters/sentry_error_presenter_spec.rb index 5f3f1d33b86..af9e7c8a2b2 100644 --- a/spec/presenters/sentry_error_presenter_spec.rb +++ b/spec/presenters/sentry_error_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SentryErrorPresenter do +RSpec.describe SentryErrorPresenter do let(:error) { build(:detailed_error_tracking_error) } let(:presenter) { described_class.new(error) } diff --git a/spec/presenters/service_hook_presenter_spec.rb b/spec/presenters/service_hook_presenter_spec.rb index bea57768e3e..adef34a882b 100644 --- a/spec/presenters/service_hook_presenter_spec.rb +++ b/spec/presenters/service_hook_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ServiceHookPresenter do +RSpec.describe ServiceHookPresenter do let(:web_hook_log) { create(:web_hook_log, web_hook: service_hook) } let(:service_hook) { create(:service_hook, service: service) } let(:service) { create(:drone_ci_service, project: project) } diff --git a/spec/presenters/snippet_blob_presenter_spec.rb b/spec/presenters/snippet_blob_presenter_spec.rb index eb7621cc591..28c86468c78 100644 --- a/spec/presenters/snippet_blob_presenter_spec.rb +++ b/spec/presenters/snippet_blob_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SnippetBlobPresenter do +RSpec.describe SnippetBlobPresenter do describe '#rich_data' do before do allow_next_instance_of(described_class) do |instance| diff --git a/spec/presenters/snippet_presenter_spec.rb b/spec/presenters/snippet_presenter_spec.rb index 423e9edc219..98c291bdd02 100644 --- a/spec/presenters/snippet_presenter_spec.rb +++ b/spec/presenters/snippet_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SnippetPresenter do +RSpec.describe SnippetPresenter do include Gitlab::Routing.url_helpers let_it_be(:user) { create(:user) } diff --git a/spec/presenters/tree_entry_presenter_spec.rb b/spec/presenters/tree_entry_presenter_spec.rb index 0c29fe3e5ff..d29a7a6ab04 100644 --- a/spec/presenters/tree_entry_presenter_spec.rb +++ b/spec/presenters/tree_entry_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TreeEntryPresenter do +RSpec.describe TreeEntryPresenter do include Gitlab::Routing.url_helpers let(:project) { create(:project, :repository) } diff --git a/spec/presenters/web_hook_log_presenter_spec.rb b/spec/presenters/web_hook_log_presenter_spec.rb index 8812a0ba594..68c8c6e2a1b 100644 --- a/spec/presenters/web_hook_log_presenter_spec.rb +++ b/spec/presenters/web_hook_log_presenter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe WebHookLogPresenter do +RSpec.describe WebHookLogPresenter do include Gitlab::Routing.url_helpers describe '#details_path' do diff --git a/spec/rack_servers/puma_spec.rb b/spec/rack_servers/puma_spec.rb index a4b37905af3..80595b267fa 100644 --- a/spec/rack_servers/puma_spec.rb +++ b/spec/rack_servers/puma_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' require 'fileutils' require 'excon' -describe 'Puma' do +RSpec.describe 'Puma' do before(:all) do project_root = Rails.root.to_s config_lines = File.read(Rails.root.join('config/puma.example.development.rb')) diff --git a/spec/rack_servers/unicorn_spec.rb b/spec/rack_servers/unicorn_spec.rb index 6a02ebcd048..5887b49d269 100644 --- a/spec/rack_servers/unicorn_spec.rb +++ b/spec/rack_servers/unicorn_spec.rb @@ -6,7 +6,7 @@ require 'excon' require 'spec_helper' -describe 'Unicorn' do +RSpec.describe 'Unicorn' do before(:all) do project_root = File.expand_path('../..', __dir__) diff --git a/spec/requests/api/access_requests_spec.rb b/spec/requests/api/access_requests_spec.rb index 52bc81cff18..223d740a004 100644 --- a/spec/requests/api/access_requests_spec.rb +++ b/spec/requests/api/access_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::AccessRequests do +RSpec.describe API::AccessRequests do let_it_be(:maintainer) { create(:user) } let_it_be(:developer) { create(:user) } let_it_be(:access_requester) { create(:user) } diff --git a/spec/requests/api/admin/ci/variables_spec.rb b/spec/requests/api/admin/ci/variables_spec.rb index 185fde17e1b..812ee93ad21 100644 --- a/spec/requests/api/admin/ci/variables_spec.rb +++ b/spec/requests/api/admin/ci/variables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ::API::Admin::Ci::Variables do +RSpec.describe ::API::Admin::Ci::Variables do let_it_be(:admin) { create(:admin) } let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/admin/sidekiq_spec.rb b/spec/requests/api/admin/sidekiq_spec.rb index 303b62f4436..3c488816bed 100644 --- a/spec/requests/api/admin/sidekiq_spec.rb +++ b/spec/requests/api/admin/sidekiq_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Admin::Sidekiq, :clean_gitlab_redis_queues do +RSpec.describe API::Admin::Sidekiq, :clean_gitlab_redis_queues do let_it_be(:admin) { create(:admin) } describe 'DELETE /admin/sidekiq/queues/:queue_name' do diff --git a/spec/requests/api/api_guard/admin_mode_middleware_spec.rb b/spec/requests/api/api_guard/admin_mode_middleware_spec.rb index 7175076e56d..4b477f829a7 100644 --- a/spec/requests/api/api_guard/admin_mode_middleware_spec.rb +++ b/spec/requests/api/api_guard/admin_mode_middleware_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::APIGuard::AdminModeMiddleware, :do_not_mock_admin_mode, :request_store do +RSpec.describe API::APIGuard::AdminModeMiddleware, :do_not_mock_admin_mode, :request_store do let(:user) { create(:admin) } it 'is loaded' do diff --git a/spec/requests/api/api_spec.rb b/spec/requests/api/api_spec.rb index 201c0d1796c..9284760bf69 100644 --- a/spec/requests/api/api_spec.rb +++ b/spec/requests/api/api_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::API do +RSpec.describe API::API do include GroupAPIHelpers describe 'Record user last activity in after hook' do diff --git a/spec/requests/api/appearance_spec.rb b/spec/requests/api/appearance_spec.rb index f8c3db70d16..69176e18d2e 100644 --- a/spec/requests/api/appearance_spec.rb +++ b/spec/requests/api/appearance_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Appearance, 'Appearance' do +RSpec.describe API::Appearance, 'Appearance' do let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/applications_spec.rb b/spec/requests/api/applications_spec.rb index cd341ad134e..5b2d835f89a 100644 --- a/spec/requests/api/applications_spec.rb +++ b/spec/requests/api/applications_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Applications, :api do +RSpec.describe API::Applications, :api do let(:admin_user) { create(:user, admin: true) } let(:user) { create(:user, admin: false) } let!(:application) { create(:application, name: 'another_application', redirect_uri: 'http://other_application.url', scopes: '') } diff --git a/spec/requests/api/avatar_spec.rb b/spec/requests/api/avatar_spec.rb index 45e34b7894b..656a086e550 100644 --- a/spec/requests/api/avatar_spec.rb +++ b/spec/requests/api/avatar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Avatar do +RSpec.describe API::Avatar do let(:gravatar_service) { double('GravatarService') } describe 'GET /avatar' do diff --git a/spec/requests/api/award_emoji_spec.rb b/spec/requests/api/award_emoji_spec.rb index 543fe970abd..1c825949ae8 100644 --- a/spec/requests/api/award_emoji_spec.rb +++ b/spec/requests/api/award_emoji_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::AwardEmoji do +RSpec.describe API::AwardEmoji do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:issue) { create(:issue, project: project) } diff --git a/spec/requests/api/badges_spec.rb b/spec/requests/api/badges_spec.rb index d7f9b7d010b..99d224cb8e9 100644 --- a/spec/requests/api/badges_spec.rb +++ b/spec/requests/api/badges_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Badges do +RSpec.describe API::Badges do let(:maintainer) { create(:user, username: 'maintainer_user') } let(:developer) { create(:user) } let(:access_requester) { create(:user) } diff --git a/spec/requests/api/boards_spec.rb b/spec/requests/api/boards_spec.rb index d761b371821..f0d3afd0af7 100644 --- a/spec/requests/api/boards_spec.rb +++ b/spec/requests/api/boards_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Boards do +RSpec.describe API::Boards do let_it_be(:user) { create(:user) } let_it_be(:non_member) { create(:user) } let_it_be(:guest) { create(:user) } diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index f2dc5b1c045..db017f8e1af 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Branches do +RSpec.describe API::Branches do let_it_be(:user) { create(:user) } let(:project) { create(:project, :repository, creator: user, path: 'my.project') } let(:guest) { create(:user).tap { |u| project.add_guest(u) } } diff --git a/spec/requests/api/broadcast_messages_spec.rb b/spec/requests/api/broadcast_messages_spec.rb index 9bfbbe0daab..b5b6ce106e5 100644 --- a/spec/requests/api/broadcast_messages_spec.rb +++ b/spec/requests/api/broadcast_messages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::BroadcastMessages do +RSpec.describe API::BroadcastMessages do let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } let_it_be(:message) { create(:broadcast_message) } diff --git a/spec/requests/api/commit_statuses_spec.rb b/spec/requests/api/commit_statuses_spec.rb index 0c0bf8b4df0..bec15b788c3 100644 --- a/spec/requests/api/commit_statuses_spec.rb +++ b/spec/requests/api/commit_statuses_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::CommitStatuses do +RSpec.describe API::CommitStatuses do let!(:project) { create(:project, :repository) } let(:commit) { project.repository.commit } let(:guest) { create_user(:guest) } diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb index a423c92e2fb..724e3177173 100644 --- a/spec/requests/api/commits_spec.rb +++ b/spec/requests/api/commits_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require 'mime/types' -describe API::Commits do +RSpec.describe API::Commits do include ProjectForksHelper let(:user) { create(:user) } diff --git a/spec/requests/api/container_registry_event_spec.rb b/spec/requests/api/container_registry_event_spec.rb index 2cdf2656cb7..4d38ddddffd 100644 --- a/spec/requests/api/container_registry_event_spec.rb +++ b/spec/requests/api/container_registry_event_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ContainerRegistryEvent do +RSpec.describe API::ContainerRegistryEvent do let(:secret_token) { 'secret_token' } let(:events) { [{ action: 'push' }] } let(:registry_headers) { { 'Content-Type' => ::API::ContainerRegistryEvent::DOCKER_DISTRIBUTION_EVENTS_V1_JSON } } diff --git a/spec/requests/api/deploy_keys_spec.rb b/spec/requests/api/deploy_keys_spec.rb index e8cc6bc71ae..81cef653770 100644 --- a/spec/requests/api/deploy_keys_spec.rb +++ b/spec/requests/api/deploy_keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::DeployKeys do +RSpec.describe API::DeployKeys do let(:user) { create(:user) } let(:maintainer) { create(:user) } let(:admin) { create(:admin) } diff --git a/spec/requests/api/deploy_tokens_spec.rb b/spec/requests/api/deploy_tokens_spec.rb index 499c334d491..0c9cdc41321 100644 --- a/spec/requests/api/deploy_tokens_spec.rb +++ b/spec/requests/api/deploy_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::DeployTokens do +RSpec.describe API::DeployTokens do let_it_be(:user) { create(:user) } let_it_be(:creator) { create(:user) } let_it_be(:project) { create(:project, creator_id: creator.id) } diff --git a/spec/requests/api/deployments_spec.rb b/spec/requests/api/deployments_spec.rb index ef2415a0cde..8113de96ac4 100644 --- a/spec/requests/api/deployments_spec.rb +++ b/spec/requests/api/deployments_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Deployments do +RSpec.describe API::Deployments do let(:user) { create(:user) } let(:non_member) { create(:user) } diff --git a/spec/requests/api/discussions_spec.rb b/spec/requests/api/discussions_spec.rb index cb3efb2cf5f..720ea429c2c 100644 --- a/spec/requests/api/discussions_spec.rb +++ b/spec/requests/api/discussions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Discussions do +RSpec.describe API::Discussions do let(:user) { create(:user) } let!(:project) { create(:project, :public, :repository, namespace: user.namespace) } let(:private_user) { create(:user) } diff --git a/spec/requests/api/doorkeeper_access_spec.rb b/spec/requests/api/doorkeeper_access_spec.rb index a25a6485f47..f16cd58bb34 100644 --- a/spec/requests/api/doorkeeper_access_spec.rb +++ b/spec/requests/api/doorkeeper_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'doorkeeper access' do +RSpec.describe 'doorkeeper access' do let!(:user) { create(:user) } let!(:application) { Doorkeeper::Application.create!(name: "MyApp", redirect_uri: "https://app.com", owner: user) } let!(:token) { Doorkeeper::AccessToken.create! application_id: application.id, resource_owner_id: user.id, scopes: "api" } diff --git a/spec/requests/api/environments_spec.rb b/spec/requests/api/environments_spec.rb index 91b3dd93433..b1ac8f9eeec 100644 --- a/spec/requests/api/environments_spec.rb +++ b/spec/requests/api/environments_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Environments do +RSpec.describe API::Environments do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:project) { create(:project, :private, :repository, namespace: user.namespace) } diff --git a/spec/requests/api/error_tracking_spec.rb b/spec/requests/api/error_tracking_spec.rb index deed9777025..8c9ca1b6a9d 100644 --- a/spec/requests/api/error_tracking_spec.rb +++ b/spec/requests/api/error_tracking_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ErrorTracking do +RSpec.describe API::ErrorTracking do let_it_be(:user) { create(:user) } let(:setting) { create(:project_error_tracking_setting) } let(:project) { setting.project } diff --git a/spec/requests/api/events_spec.rb b/spec/requests/api/events_spec.rb index 0425e0791eb..0092fcc3f56 100644 --- a/spec/requests/api/events_spec.rb +++ b/spec/requests/api/events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Events do +RSpec.describe API::Events do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:private_project) { create(:project, :private, creator_id: user.id, namespace: user.namespace) } diff --git a/spec/requests/api/features_spec.rb b/spec/requests/api/features_spec.rb index 59a9ed2f77d..2746e777306 100644 --- a/spec/requests/api/features_spec.rb +++ b/spec/requests/api/features_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Features, stub_feature_flags: false do +RSpec.describe API::Features, stub_feature_flags: false do let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/files_spec.rb b/spec/requests/api/files_spec.rb index a54213a8556..358eecb10c5 100644 --- a/spec/requests/api/files_spec.rb +++ b/spec/requests/api/files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Files do +RSpec.describe API::Files do include RepoHelpers let(:user) { create(:user) } diff --git a/spec/requests/api/freeze_periods_spec.rb b/spec/requests/api/freeze_periods_spec.rb index 0b7828ebedf..5589d4d543d 100644 --- a/spec/requests/api/freeze_periods_spec.rb +++ b/spec/requests/api/freeze_periods_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::FreezePeriods do +RSpec.describe API::FreezePeriods do let_it_be(:project) { create(:project, :repository, :private) } let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/graphql/boards/board_lists_query_spec.rb b/spec/requests/api/graphql/boards/board_lists_query_spec.rb index 3cc1468be02..8a89590c85a 100644 --- a/spec/requests/api/graphql/boards/board_lists_query_spec.rb +++ b/spec/requests/api/graphql/boards/board_lists_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'get board lists' do +RSpec.describe 'get board lists' do include GraphqlHelpers let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/graphql/boards/boards_query_spec.rb b/spec/requests/api/graphql/boards/boards_query_spec.rb index a17554aba21..50004e5a8a1 100644 --- a/spec/requests/api/graphql/boards/boards_query_spec.rb +++ b/spec/requests/api/graphql/boards/boards_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'get list of boards' do +RSpec.describe 'get list of boards' do include GraphqlHelpers include_context 'group and project boards query context' diff --git a/spec/requests/api/graphql/current_user/todos_query_spec.rb b/spec/requests/api/graphql/current_user/todos_query_spec.rb index 321e1062a96..e298de0df01 100644 --- a/spec/requests/api/graphql/current_user/todos_query_spec.rb +++ b/spec/requests/api/graphql/current_user/todos_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Query current user todos' do +RSpec.describe 'Query current user todos' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/current_user_query_spec.rb b/spec/requests/api/graphql/current_user_query_spec.rb index 2b38b8e98ab..dc832b42fa5 100644 --- a/spec/requests/api/graphql/current_user_query_spec.rb +++ b/spec/requests/api/graphql/current_user_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting project information' do +RSpec.describe 'getting project information' do include GraphqlHelpers let(:query) do diff --git a/spec/requests/api/graphql/gitlab_schema_spec.rb b/spec/requests/api/graphql/gitlab_schema_spec.rb index 266c98d6f08..ee7dba545be 100644 --- a/spec/requests/api/graphql/gitlab_schema_spec.rb +++ b/spec/requests/api/graphql/gitlab_schema_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'GitlabSchema configurations' do +RSpec.describe 'GitlabSchema configurations' do include GraphqlHelpers let_it_be(:project) { create(:project) } diff --git a/spec/requests/api/graphql/group/labels_query_spec.rb b/spec/requests/api/graphql/group/labels_query_spec.rb index 6c34cbadf95..31556ffca30 100644 --- a/spec/requests/api/graphql/group/labels_query_spec.rb +++ b/spec/requests/api/graphql/group/labels_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting group label information' do +RSpec.describe 'getting group label information' do include GraphqlHelpers let_it_be(:group) { create(:group, :public) } diff --git a/spec/requests/api/graphql/group/milestones_spec.rb b/spec/requests/api/graphql/group/milestones_spec.rb index bad0024e7a3..e85adeb4690 100644 --- a/spec/requests/api/graphql/group/milestones_spec.rb +++ b/spec/requests/api/graphql/group/milestones_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Milestones through GroupQuery' do +RSpec.describe 'Milestones through GroupQuery' do include GraphqlHelpers let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/graphql/group_query_spec.rb b/spec/requests/api/graphql/group_query_spec.rb index c7b537a9923..d99bff2e349 100644 --- a/spec/requests/api/graphql/group_query_spec.rb +++ b/spec/requests/api/graphql/group_query_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' # Based on spec/requests/api/groups_spec.rb # Should follow closely in order to ensure all situations are covered -describe 'getting group information', :do_not_mock_admin_mode do +RSpec.describe 'getting group information', :do_not_mock_admin_mode do include GraphqlHelpers include UploadHelpers diff --git a/spec/requests/api/graphql/metadata_query_spec.rb b/spec/requests/api/graphql/metadata_query_spec.rb index 4c56c559cf9..6344ec371c8 100644 --- a/spec/requests/api/graphql/metadata_query_spec.rb +++ b/spec/requests/api/graphql/metadata_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting project information' do +RSpec.describe 'getting project information' do include GraphqlHelpers let(:query) { graphql_query_for('metadata', {}, all_graphql_fields_for('Metadata')) } diff --git a/spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb b/spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb index cb35411b7a5..c47920087dc 100644 --- a/spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb +++ b/spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Getting Metrics Dashboard Annotations' do +RSpec.describe 'Getting Metrics Dashboard Annotations' do include GraphqlHelpers let_it_be(:project) { create(:project) } diff --git a/spec/requests/api/graphql/metrics/dashboard_query_spec.rb b/spec/requests/api/graphql/metrics/dashboard_query_spec.rb index b5ff8e9be76..456b0a5dea1 100644 --- a/spec/requests/api/graphql/metrics/dashboard_query_spec.rb +++ b/spec/requests/api/graphql/metrics/dashboard_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Getting Metrics Dashboard' do +RSpec.describe 'Getting Metrics Dashboard' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/multiplexed_queries_spec.rb b/spec/requests/api/graphql/multiplexed_queries_spec.rb index 9ebb57f6b9c..f79bac6ae3b 100644 --- a/spec/requests/api/graphql/multiplexed_queries_spec.rb +++ b/spec/requests/api/graphql/multiplexed_queries_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'Multiplexed queries' do +RSpec.describe 'Multiplexed queries' do include GraphqlHelpers it 'returns responses for multiple queries' do diff --git a/spec/requests/api/graphql/mutations/admin/sidekiq_queues/delete_jobs_spec.rb b/spec/requests/api/graphql/mutations/admin/sidekiq_queues/delete_jobs_spec.rb index a5159da84f3..4ad35e7f0d1 100644 --- a/spec/requests/api/graphql/mutations/admin/sidekiq_queues/delete_jobs_spec.rb +++ b/spec/requests/api/graphql/mutations/admin/sidekiq_queues/delete_jobs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Deleting Sidekiq jobs', :clean_gitlab_redis_queues do +RSpec.describe 'Deleting Sidekiq jobs', :clean_gitlab_redis_queues do include GraphqlHelpers let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/graphql/mutations/alert_management/alerts/create_alert_issue_spec.rb b/spec/requests/api/graphql/mutations/alert_management/alerts/create_alert_issue_spec.rb index 5b5b2ec8788..6141a172253 100644 --- a/spec/requests/api/graphql/mutations/alert_management/alerts/create_alert_issue_spec.rb +++ b/spec/requests/api/graphql/mutations/alert_management/alerts/create_alert_issue_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Create an alert issue from an alert' do +RSpec.describe 'Create an alert issue from an alert' do include GraphqlHelpers let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb b/spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb index 2a470bda689..ff55656a2ae 100644 --- a/spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb +++ b/spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Setting the status of an alert' do +RSpec.describe 'Setting the status of an alert' do include GraphqlHelpers let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb b/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb index 6c1dcfd4a44..1891300dace 100644 --- a/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb +++ b/spec/requests/api/graphql/mutations/award_emojis/add_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Adding an AwardEmoji' do +RSpec.describe 'Adding an AwardEmoji' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/award_emojis/remove_spec.rb b/spec/requests/api/graphql/mutations/award_emojis/remove_spec.rb index 68b88e49049..665b511abb8 100644 --- a/spec/requests/api/graphql/mutations/award_emojis/remove_spec.rb +++ b/spec/requests/api/graphql/mutations/award_emojis/remove_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Removing an AwardEmoji' do +RSpec.describe 'Removing an AwardEmoji' do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb b/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb index 72bd911f4c4..ab4a213fde3 100644 --- a/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb +++ b/spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Toggling an AwardEmoji' do +RSpec.describe 'Toggling an AwardEmoji' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/branches/create_spec.rb b/spec/requests/api/graphql/mutations/branches/create_spec.rb index b3c378ec2bc..082b445bf3e 100644 --- a/spec/requests/api/graphql/mutations/branches/create_spec.rb +++ b/spec/requests/api/graphql/mutations/branches/create_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Creation of a new branch' do +RSpec.describe 'Creation of a new branch' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/commits/create_spec.rb b/spec/requests/api/graphql/mutations/commits/create_spec.rb index 10a69932948..9e4a96700bb 100644 --- a/spec/requests/api/graphql/mutations/commits/create_spec.rb +++ b/spec/requests/api/graphql/mutations/commits/create_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Creation of a new commit' do +RSpec.describe 'Creation of a new commit' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/design_management/delete_spec.rb b/spec/requests/api/graphql/mutations/design_management/delete_spec.rb index 10376305b3e..e329416faee 100644 --- a/spec/requests/api/graphql/mutations/design_management/delete_spec.rb +++ b/spec/requests/api/graphql/mutations/design_management/delete_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "deleting designs" do +RSpec.describe "deleting designs" do include GraphqlHelpers include DesignManagementTestHelpers diff --git a/spec/requests/api/graphql/mutations/design_management/upload_spec.rb b/spec/requests/api/graphql/mutations/design_management/upload_spec.rb index 22adc064406..9a9c7107b20 100644 --- a/spec/requests/api/graphql/mutations/design_management/upload_spec.rb +++ b/spec/requests/api/graphql/mutations/design_management/upload_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require "spec_helper" -describe "uploading designs" do +RSpec.describe "uploading designs" do include GraphqlHelpers include DesignManagementTestHelpers include WorkhorseHelpers diff --git a/spec/requests/api/graphql/mutations/discussions/toggle_resolve_spec.rb b/spec/requests/api/graphql/mutations/discussions/toggle_resolve_spec.rb index 95e967c039d..e83da830935 100644 --- a/spec/requests/api/graphql/mutations/discussions/toggle_resolve_spec.rb +++ b/spec/requests/api/graphql/mutations/discussions/toggle_resolve_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Toggling the resolve status of a discussion' do +RSpec.describe 'Toggling the resolve status of a discussion' do include GraphqlHelpers let_it_be(:project) { create(:project, :public, :repository) } diff --git a/spec/requests/api/graphql/mutations/issues/set_confidential_spec.rb b/spec/requests/api/graphql/mutations/issues/set_confidential_spec.rb index 4d0bb59b030..3f804a46992 100644 --- a/spec/requests/api/graphql/mutations/issues/set_confidential_spec.rb +++ b/spec/requests/api/graphql/mutations/issues/set_confidential_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Setting an issue as confidential' do +RSpec.describe 'Setting an issue as confidential' do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/issues/set_due_date_spec.rb b/spec/requests/api/graphql/mutations/issues/set_due_date_spec.rb index 1efa9e16233..3dd1225db5a 100644 --- a/spec/requests/api/graphql/mutations/issues/set_due_date_spec.rb +++ b/spec/requests/api/graphql/mutations/issues/set_due_date_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Setting Due Date of an issue' do +RSpec.describe 'Setting Due Date of an issue' do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/jira_import/start_spec.rb b/spec/requests/api/graphql/mutations/jira_import/start_spec.rb index 296d33aec5d..050073f8b98 100644 --- a/spec/requests/api/graphql/mutations/jira_import/start_spec.rb +++ b/spec/requests/api/graphql/mutations/jira_import/start_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Starting a Jira Import' do +RSpec.describe 'Starting a Jira Import' do include JiraServiceHelper include GraphqlHelpers diff --git a/spec/requests/api/graphql/mutations/merge_requests/create_spec.rb b/spec/requests/api/graphql/mutations/merge_requests/create_spec.rb index 5c63f655f1d..d4ac639e226 100644 --- a/spec/requests/api/graphql/mutations/merge_requests/create_spec.rb +++ b/spec/requests/api/graphql/mutations/merge_requests/create_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Creation of a new merge request' do +RSpec.describe 'Creation of a new merge request' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/merge_requests/set_assignees_spec.rb b/spec/requests/api/graphql/mutations/merge_requests/set_assignees_spec.rb index 8f908b7bf88..97873b01338 100644 --- a/spec/requests/api/graphql/mutations/merge_requests/set_assignees_spec.rb +++ b/spec/requests/api/graphql/mutations/merge_requests/set_assignees_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Setting assignees of a merge request' do +RSpec.describe 'Setting assignees of a merge request' do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/merge_requests/set_labels_spec.rb b/spec/requests/api/graphql/mutations/merge_requests/set_labels_spec.rb index 2112ff0dc74..34d347c76fd 100644 --- a/spec/requests/api/graphql/mutations/merge_requests/set_labels_spec.rb +++ b/spec/requests/api/graphql/mutations/merge_requests/set_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Setting labels of a merge request' do +RSpec.describe 'Setting labels of a merge request' do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/merge_requests/set_locked_spec.rb b/spec/requests/api/graphql/mutations/merge_requests/set_locked_spec.rb index c45da613591..a1a35bc1dcc 100644 --- a/spec/requests/api/graphql/mutations/merge_requests/set_locked_spec.rb +++ b/spec/requests/api/graphql/mutations/merge_requests/set_locked_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Setting locked status of a merge request' do +RSpec.describe 'Setting locked status of a merge request' do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/merge_requests/set_milestone_spec.rb b/spec/requests/api/graphql/mutations/merge_requests/set_milestone_spec.rb index bd558edf9c5..d7e2602bd0a 100644 --- a/spec/requests/api/graphql/mutations/merge_requests/set_milestone_spec.rb +++ b/spec/requests/api/graphql/mutations/merge_requests/set_milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Setting milestone of a merge request' do +RSpec.describe 'Setting milestone of a merge request' do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/merge_requests/set_subscription_spec.rb b/spec/requests/api/graphql/mutations/merge_requests/set_subscription_spec.rb index 975735bf246..6b3035fbf48 100644 --- a/spec/requests/api/graphql/mutations/merge_requests/set_subscription_spec.rb +++ b/spec/requests/api/graphql/mutations/merge_requests/set_subscription_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Setting subscribed status of a merge request' do +RSpec.describe 'Setting subscribed status of a merge request' do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/merge_requests/set_wip_spec.rb b/spec/requests/api/graphql/mutations/merge_requests/set_wip_spec.rb index 4492c51dbd7..b06f7aa2ed9 100644 --- a/spec/requests/api/graphql/mutations/merge_requests/set_wip_spec.rb +++ b/spec/requests/api/graphql/mutations/merge_requests/set_wip_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Setting WIP status of a merge request' do +RSpec.describe 'Setting WIP status of a merge request' do include GraphqlHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/metrics/dashboard/annotations/create_spec.rb b/spec/requests/api/graphql/mutations/metrics/dashboard/annotations/create_spec.rb index 8568dc8ffc0..0e2da94f0f9 100644 --- a/spec/requests/api/graphql/mutations/metrics/dashboard/annotations/create_spec.rb +++ b/spec/requests/api/graphql/mutations/metrics/dashboard/annotations/create_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::Metrics::Dashboard::Annotations::Create do +RSpec.describe Mutations::Metrics::Dashboard::Annotations::Create do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/notes/create/diff_note_spec.rb b/spec/requests/api/graphql/mutations/notes/create/diff_note_spec.rb index 4c535434faa..e847c46be1b 100644 --- a/spec/requests/api/graphql/mutations/notes/create/diff_note_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/create/diff_note_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Adding a DiffNote' do +RSpec.describe 'Adding a DiffNote' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/notes/create/image_diff_note_spec.rb b/spec/requests/api/graphql/mutations/notes/create/image_diff_note_spec.rb index 0bba3e79434..896a398e308 100644 --- a/spec/requests/api/graphql/mutations/notes/create/image_diff_note_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/create/image_diff_note_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Adding an image DiffNote' do +RSpec.describe 'Adding an image DiffNote' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/notes/create/note_spec.rb b/spec/requests/api/graphql/mutations/notes/create/note_spec.rb index 9a78d44245e..2c34bf1c39b 100644 --- a/spec/requests/api/graphql/mutations/notes/create/note_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/create/note_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Adding a Note' do +RSpec.describe 'Adding a Note' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/notes/destroy_spec.rb b/spec/requests/api/graphql/mutations/notes/destroy_spec.rb index 337a6e6f6e6..6002a5b5b9d 100644 --- a/spec/requests/api/graphql/mutations/notes/destroy_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/destroy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Destroying a Note' do +RSpec.describe 'Destroying a Note' do include GraphqlHelpers let!(:note) { create(:note) } diff --git a/spec/requests/api/graphql/mutations/notes/update/image_diff_note_spec.rb b/spec/requests/api/graphql/mutations/notes/update/image_diff_note_spec.rb index 0362fef2d2e..f7be671e5f3 100644 --- a/spec/requests/api/graphql/mutations/notes/update/image_diff_note_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/update/image_diff_note_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Updating an image DiffNote' do +RSpec.describe 'Updating an image DiffNote' do include GraphqlHelpers using RSpec::Parameterized::TableSyntax diff --git a/spec/requests/api/graphql/mutations/notes/update/note_spec.rb b/spec/requests/api/graphql/mutations/notes/update/note_spec.rb index a5c6b72005e..38378310d9f 100644 --- a/spec/requests/api/graphql/mutations/notes/update/note_spec.rb +++ b/spec/requests/api/graphql/mutations/notes/update/note_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Updating a Note' do +RSpec.describe 'Updating a Note' do include GraphqlHelpers let!(:note) { create(:note, note: original_body) } diff --git a/spec/requests/api/graphql/mutations/snippets/create_spec.rb b/spec/requests/api/graphql/mutations/snippets/create_spec.rb index 642b5e46109..8894a73874e 100644 --- a/spec/requests/api/graphql/mutations/snippets/create_spec.rb +++ b/spec/requests/api/graphql/mutations/snippets/create_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Creating a Snippet' do +RSpec.describe 'Creating a Snippet' do include GraphqlHelpers let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/snippets/destroy_spec.rb b/spec/requests/api/graphql/mutations/snippets/destroy_spec.rb index cb9aeea74b2..8ade72635af 100644 --- a/spec/requests/api/graphql/mutations/snippets/destroy_spec.rb +++ b/spec/requests/api/graphql/mutations/snippets/destroy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Destroying a Snippet' do +RSpec.describe 'Destroying a Snippet' do include GraphqlHelpers let(:current_user) { snippet.author } diff --git a/spec/requests/api/graphql/mutations/snippets/mark_as_spam_spec.rb b/spec/requests/api/graphql/mutations/snippets/mark_as_spam_spec.rb index 6d4dce3f6f1..97e6ae8fda8 100644 --- a/spec/requests/api/graphql/mutations/snippets/mark_as_spam_spec.rb +++ b/spec/requests/api/graphql/mutations/snippets/mark_as_spam_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Mark snippet as spam', :do_not_mock_admin_mode do +RSpec.describe 'Mark snippet as spam', :do_not_mock_admin_mode do include GraphqlHelpers let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/graphql/mutations/snippets/update_spec.rb b/spec/requests/api/graphql/mutations/snippets/update_spec.rb index de2e309c1b6..3b2f9dc0f19 100644 --- a/spec/requests/api/graphql/mutations/snippets/update_spec.rb +++ b/spec/requests/api/graphql/mutations/snippets/update_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Updating a Snippet' do +RSpec.describe 'Updating a Snippet' do include GraphqlHelpers let_it_be(:original_content) { 'Initial content' } diff --git a/spec/requests/api/graphql/mutations/todos/mark_all_done_spec.rb b/spec/requests/api/graphql/mutations/todos/mark_all_done_spec.rb index 40e085027d7..ed5552f3e30 100644 --- a/spec/requests/api/graphql/mutations/todos/mark_all_done_spec.rb +++ b/spec/requests/api/graphql/mutations/todos/mark_all_done_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Marking all todos done' do +RSpec.describe 'Marking all todos done' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/todos/mark_done_spec.rb b/spec/requests/api/graphql/mutations/todos/mark_done_spec.rb index fabbb3aeb49..9c4733f6769 100644 --- a/spec/requests/api/graphql/mutations/todos/mark_done_spec.rb +++ b/spec/requests/api/graphql/mutations/todos/mark_done_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Marking todos done' do +RSpec.describe 'Marking todos done' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/mutations/todos/restore_spec.rb b/spec/requests/api/graphql/mutations/todos/restore_spec.rb index faa36c8273a..6dedde56e13 100644 --- a/spec/requests/api/graphql/mutations/todos/restore_spec.rb +++ b/spec/requests/api/graphql/mutations/todos/restore_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Restoring Todos' do +RSpec.describe 'Restoring Todos' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/namespace/projects_spec.rb b/spec/requests/api/graphql/namespace/projects_spec.rb index 2a95b99572f..0b634e6b689 100644 --- a/spec/requests/api/graphql/namespace/projects_spec.rb +++ b/spec/requests/api/graphql/namespace/projects_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting projects' do +RSpec.describe 'getting projects' do include GraphqlHelpers let(:group) { create(:group) } diff --git a/spec/requests/api/graphql/namespace/root_storage_statistics_spec.rb b/spec/requests/api/graphql/namespace/root_storage_statistics_spec.rb index f7e28043930..44e68c59248 100644 --- a/spec/requests/api/graphql/namespace/root_storage_statistics_spec.rb +++ b/spec/requests/api/graphql/namespace/root_storage_statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'rendering namespace statistics' do +RSpec.describe 'rendering namespace statistics' do include GraphqlHelpers let(:namespace) { user.namespace } diff --git a/spec/requests/api/graphql/project/alert_management/alert_status_counts_spec.rb b/spec/requests/api/graphql/project/alert_management/alert_status_counts_spec.rb index a0d1ff7efc5..b62215f43fb 100644 --- a/spec/requests/api/graphql/project/alert_management/alert_status_counts_spec.rb +++ b/spec/requests/api/graphql/project/alert_management/alert_status_counts_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'getting Alert Management Alert counts by status' do +RSpec.describe 'getting Alert Management Alert counts by status' do include GraphqlHelpers let_it_be(:project) { create(:project, :repository) } diff --git a/spec/requests/api/graphql/project/alert_management/alerts_spec.rb b/spec/requests/api/graphql/project/alert_management/alerts_spec.rb index c591895f295..4ec11762dc2 100644 --- a/spec/requests/api/graphql/project/alert_management/alerts_spec.rb +++ b/spec/requests/api/graphql/project/alert_management/alerts_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'getting Alert Management Alerts' do +RSpec.describe 'getting Alert Management Alerts' do include GraphqlHelpers let_it_be(:payload) { { 'custom' => { 'alert' => 'payload' } } } diff --git a/spec/requests/api/graphql/project/base_service_spec.rb b/spec/requests/api/graphql/project/base_service_spec.rb index 8199f331fbf..4dfc242da80 100644 --- a/spec/requests/api/graphql/project/base_service_spec.rb +++ b/spec/requests/api/graphql/project/base_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'query Jira service' do +RSpec.describe 'query Jira service' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/project/container_expiration_policy_spec.rb b/spec/requests/api/graphql/project/container_expiration_policy_spec.rb index d0563f9ff05..b064e4d43e9 100644 --- a/spec/requests/api/graphql/project/container_expiration_policy_spec.rb +++ b/spec/requests/api/graphql/project/container_expiration_policy_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'getting a repository in a project' do +RSpec.describe 'getting a repository in a project' do include GraphqlHelpers let_it_be(:project) { create(:project) } diff --git a/spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb b/spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb index a1f9fa1f10c..b2b42137acf 100644 --- a/spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb +++ b/spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'getting a detailed sentry error' do +RSpec.describe 'getting a detailed sentry error' do include GraphqlHelpers let_it_be(:project) { create(:project, :repository) } diff --git a/spec/requests/api/graphql/project/error_tracking/sentry_errors_request_spec.rb b/spec/requests/api/graphql/project/error_tracking/sentry_errors_request_spec.rb index 06a0bfc0d32..cd84ce9cb96 100644 --- a/spec/requests/api/graphql/project/error_tracking/sentry_errors_request_spec.rb +++ b/spec/requests/api/graphql/project/error_tracking/sentry_errors_request_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'sentry errors requests' do +RSpec.describe 'sentry errors requests' do include GraphqlHelpers let_it_be(:project) { create(:project, :repository) } let_it_be(:project_setting) { create(:project_error_tracking_setting, project: project) } diff --git a/spec/requests/api/graphql/project/grafana_integration_spec.rb b/spec/requests/api/graphql/project/grafana_integration_spec.rb index c9bc6c1a68e..688959e622d 100644 --- a/spec/requests/api/graphql/project/grafana_integration_spec.rb +++ b/spec/requests/api/graphql/project/grafana_integration_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'Getting Grafana Integration' do +RSpec.describe 'Getting Grafana Integration' do include GraphqlHelpers let_it_be(:project) { create(:project, :repository) } diff --git a/spec/requests/api/graphql/project/issue/design_collection/version_spec.rb b/spec/requests/api/graphql/project/issue/design_collection/version_spec.rb index 04f445b4318..1b654e660e3 100644 --- a/spec/requests/api/graphql/project/issue/design_collection/version_spec.rb +++ b/spec/requests/api/graphql/project/issue/design_collection/version_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Query.project(fullPath).issue(iid).designCollection.version(sha)' do +RSpec.describe 'Query.project(fullPath).issue(iid).designCollection.version(sha)' do include GraphqlHelpers include DesignManagementTestHelpers diff --git a/spec/requests/api/graphql/project/issue/design_collection/versions_spec.rb b/spec/requests/api/graphql/project/issue/design_collection/versions_spec.rb index 18787bf925d..640ac95cd86 100644 --- a/spec/requests/api/graphql/project/issue/design_collection/versions_spec.rb +++ b/spec/requests/api/graphql/project/issue/design_collection/versions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Getting versions related to an issue' do +RSpec.describe 'Getting versions related to an issue' do include GraphqlHelpers include DesignManagementTestHelpers diff --git a/spec/requests/api/graphql/project/issue/designs/designs_spec.rb b/spec/requests/api/graphql/project/issue/designs/designs_spec.rb index b6fd0d91bda..e47c025f8b2 100644 --- a/spec/requests/api/graphql/project/issue/designs/designs_spec.rb +++ b/spec/requests/api/graphql/project/issue/designs/designs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Getting designs related to an issue' do +RSpec.describe 'Getting designs related to an issue' do include GraphqlHelpers include DesignManagementTestHelpers diff --git a/spec/requests/api/graphql/project/issue/designs/notes_spec.rb b/spec/requests/api/graphql/project/issue/designs/notes_spec.rb index 0207bb9123a..ae5c8363d0f 100644 --- a/spec/requests/api/graphql/project/issue/designs/notes_spec.rb +++ b/spec/requests/api/graphql/project/issue/designs/notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Getting designs related to an issue' do +RSpec.describe 'Getting designs related to an issue' do include GraphqlHelpers include DesignManagementTestHelpers diff --git a/spec/requests/api/graphql/project/issue/notes_spec.rb b/spec/requests/api/graphql/project/issue/notes_spec.rb index bfc89434370..97f5261ef1d 100644 --- a/spec/requests/api/graphql/project/issue/notes_spec.rb +++ b/spec/requests/api/graphql/project/issue/notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting notes for an issue' do +RSpec.describe 'getting notes for an issue' do include GraphqlHelpers let(:noteable) { create(:issue) } diff --git a/spec/requests/api/graphql/project/issue_spec.rb b/spec/requests/api/graphql/project/issue_spec.rb index 92d2f9d0d31..5f368833181 100644 --- a/spec/requests/api/graphql/project/issue_spec.rb +++ b/spec/requests/api/graphql/project/issue_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Query.project(fullPath).issue(iid)' do +RSpec.describe 'Query.project(fullPath).issue(iid)' do include GraphqlHelpers let_it_be(:project) { create(:project) } diff --git a/spec/requests/api/graphql/project/issues_spec.rb b/spec/requests/api/graphql/project/issues_spec.rb index 3128f527356..cdfff2f50d4 100644 --- a/spec/requests/api/graphql/project/issues_spec.rb +++ b/spec/requests/api/graphql/project/issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting an issue list for a project' do +RSpec.describe 'getting an issue list for a project' do include GraphqlHelpers let(:project) { create(:project, :repository, :public) } diff --git a/spec/requests/api/graphql/project/jira_import_spec.rb b/spec/requests/api/graphql/project/jira_import_spec.rb index 7be14696963..814965262b6 100644 --- a/spec/requests/api/graphql/project/jira_import_spec.rb +++ b/spec/requests/api/graphql/project/jira_import_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'query Jira import data' do +RSpec.describe 'query Jira import data' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/project/jira_projects_spec.rb b/spec/requests/api/graphql/project/jira_projects_spec.rb index 4d44d55f2de..d5f59711ab1 100644 --- a/spec/requests/api/graphql/project/jira_projects_spec.rb +++ b/spec/requests/api/graphql/project/jira_projects_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'query Jira projects' do +RSpec.describe 'query Jira projects' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/project/jira_service_spec.rb b/spec/requests/api/graphql/project/jira_service_spec.rb index 4ac598b789f..905a669bf0d 100644 --- a/spec/requests/api/graphql/project/jira_service_spec.rb +++ b/spec/requests/api/graphql/project/jira_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'query Jira service' do +RSpec.describe 'query Jira service' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql/project/labels_query_spec.rb b/spec/requests/api/graphql/project/labels_query_spec.rb index ecc43e0a3db..eeaaaaee575 100644 --- a/spec/requests/api/graphql/project/labels_query_spec.rb +++ b/spec/requests/api/graphql/project/labels_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting project label information' do +RSpec.describe 'getting project label information' do include GraphqlHelpers let_it_be(:project) { create(:project, :public) } diff --git a/spec/requests/api/graphql/project/merge_request/diff_notes_spec.rb b/spec/requests/api/graphql/project/merge_request/diff_notes_spec.rb index c616310a72c..dd16b052e0e 100644 --- a/spec/requests/api/graphql/project/merge_request/diff_notes_spec.rb +++ b/spec/requests/api/graphql/project/merge_request/diff_notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting notes for a merge request' do +RSpec.describe 'getting notes for a merge request' do include GraphqlHelpers let_it_be(:noteable) { create(:merge_request) } diff --git a/spec/requests/api/graphql/project/merge_request_spec.rb b/spec/requests/api/graphql/project/merge_request_spec.rb index 643532bf2e2..f4f1cfaaab5 100644 --- a/spec/requests/api/graphql/project/merge_request_spec.rb +++ b/spec/requests/api/graphql/project/merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting merge request information nested in a project' do +RSpec.describe 'getting merge request information nested in a project' do include GraphqlHelpers let(:project) { create(:project, :repository, :public) } diff --git a/spec/requests/api/graphql/project/merge_requests_spec.rb b/spec/requests/api/graphql/project/merge_requests_spec.rb index 49fdfe29874..e2255fdb048 100644 --- a/spec/requests/api/graphql/project/merge_requests_spec.rb +++ b/spec/requests/api/graphql/project/merge_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting merge request listings nested in a project' do +RSpec.describe 'getting merge request listings nested in a project' do include GraphqlHelpers let_it_be(:project) { create(:project, :repository, :public) } diff --git a/spec/requests/api/graphql/project/project_statistics_spec.rb b/spec/requests/api/graphql/project/project_statistics_spec.rb index 05dd5d36c26..c226b10ab51 100644 --- a/spec/requests/api/graphql/project/project_statistics_spec.rb +++ b/spec/requests/api/graphql/project/project_statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'rendering project statistics' do +RSpec.describe 'rendering project statistics' do include GraphqlHelpers let(:project) { create(:project) } diff --git a/spec/requests/api/graphql/project/release_spec.rb b/spec/requests/api/graphql/project/release_spec.rb index e45193b3c28..bd3e5b5c340 100644 --- a/spec/requests/api/graphql/project/release_spec.rb +++ b/spec/requests/api/graphql/project/release_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Query.project(fullPath).release(tagName)' do +RSpec.describe 'Query.project(fullPath).release(tagName)' do include GraphqlHelpers include Presentable diff --git a/spec/requests/api/graphql/project/repository_spec.rb b/spec/requests/api/graphql/project/repository_spec.rb index 261433a3d6a..bd719a69647 100644 --- a/spec/requests/api/graphql/project/repository_spec.rb +++ b/spec/requests/api/graphql/project/repository_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'getting a repository in a project' do +RSpec.describe 'getting a repository in a project' do include GraphqlHelpers let(:project) { create(:project, :repository) } diff --git a/spec/requests/api/graphql/project/tree/tree_spec.rb b/spec/requests/api/graphql/project/tree/tree_spec.rb index 94128cc21ee..bce63d57c38 100644 --- a/spec/requests/api/graphql/project/tree/tree_spec.rb +++ b/spec/requests/api/graphql/project/tree/tree_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'getting a tree in a project' do +RSpec.describe 'getting a tree in a project' do include GraphqlHelpers let(:project) { create(:project, :repository) } diff --git a/spec/requests/api/graphql/project_query_spec.rb b/spec/requests/api/graphql/project_query_spec.rb index 9a88b47eea6..b115030afbc 100644 --- a/spec/requests/api/graphql/project_query_spec.rb +++ b/spec/requests/api/graphql/project_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting project information' do +RSpec.describe 'getting project information' do include GraphqlHelpers let(:project) { create(:project, :repository) } diff --git a/spec/requests/api/graphql/query_spec.rb b/spec/requests/api/graphql/query_spec.rb index 26b4c6eafd7..6bd0703c121 100644 --- a/spec/requests/api/graphql/query_spec.rb +++ b/spec/requests/api/graphql/query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Query' do +RSpec.describe 'Query' do include GraphqlHelpers let_it_be(:project) { create(:project) } diff --git a/spec/requests/api/graphql/read_only_spec.rb b/spec/requests/api/graphql/read_only_spec.rb index 1d28a71258d..ce8a3f6ef5c 100644 --- a/spec/requests/api/graphql/read_only_spec.rb +++ b/spec/requests/api/graphql/read_only_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Requests on a read-only node' do +RSpec.describe 'Requests on a read-only node' do include GraphqlHelpers before do diff --git a/spec/requests/api/graphql/tasks/task_completion_status_spec.rb b/spec/requests/api/graphql/tasks/task_completion_status_spec.rb index c47406ea534..5f4d2aec718 100644 --- a/spec/requests/api/graphql/tasks/task_completion_status_spec.rb +++ b/spec/requests/api/graphql/tasks/task_completion_status_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting task completion status information' do +RSpec.describe 'getting task completion status information' do include GraphqlHelpers description_0_done = '- [ ] task 1\n- [ ] task 2' diff --git a/spec/requests/api/graphql/user_query_spec.rb b/spec/requests/api/graphql/user_query_spec.rb index 5ac94bc7323..7ba1788a9ef 100644 --- a/spec/requests/api/graphql/user_query_spec.rb +++ b/spec/requests/api/graphql/user_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'getting user information' do +RSpec.describe 'getting user information' do include GraphqlHelpers let(:query) do diff --git a/spec/requests/api/graphql/user_spec.rb b/spec/requests/api/graphql/user_spec.rb index 097c75b3541..d2d6b1fca66 100644 --- a/spec/requests/api/graphql/user_spec.rb +++ b/spec/requests/api/graphql/user_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User' do +RSpec.describe 'User' do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/graphql_spec.rb b/spec/requests/api/graphql_spec.rb index 84be5ab0951..ff1a5aa1540 100644 --- a/spec/requests/api/graphql_spec.rb +++ b/spec/requests/api/graphql_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'GraphQL' do +RSpec.describe 'GraphQL' do include GraphqlHelpers let(:query) { graphql_query_for('echo', 'text' => 'Hello world' ) } diff --git a/spec/requests/api/group_boards_spec.rb b/spec/requests/api/group_boards_spec.rb index a9083f82f25..6ce8b766807 100644 --- a/spec/requests/api/group_boards_spec.rb +++ b/spec/requests/api/group_boards_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::GroupBoards do +RSpec.describe API::GroupBoards do let_it_be(:user) { create(:user) } let_it_be(:non_member) { create(:user) } let_it_be(:guest) { create(:user) } diff --git a/spec/requests/api/group_clusters_spec.rb b/spec/requests/api/group_clusters_spec.rb index fade54f6b11..0e695cc64a2 100644 --- a/spec/requests/api/group_clusters_spec.rb +++ b/spec/requests/api/group_clusters_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::GroupClusters do +RSpec.describe API::GroupClusters do include KubernetesHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/group_container_repositories_spec.rb b/spec/requests/api/group_container_repositories_spec.rb index 9f439bb2167..3128becae6d 100644 --- a/spec/requests/api/group_container_repositories_spec.rb +++ b/spec/requests/api/group_container_repositories_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::GroupContainerRepositories do +RSpec.describe API::GroupContainerRepositories do let_it_be(:group) { create(:group, :private) } let_it_be(:project) { create(:project, :private, group: group) } let_it_be(:reporter) { create(:user) } diff --git a/spec/requests/api/group_export_spec.rb b/spec/requests/api/group_export_spec.rb index 9dd7797c768..8ce8068018b 100644 --- a/spec/requests/api/group_export_spec.rb +++ b/spec/requests/api/group_export_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::GroupExport do +RSpec.describe API::GroupExport do let_it_be(:group) { create(:group) } let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/group_import_spec.rb b/spec/requests/api/group_import_spec.rb index b60a1b3f119..cf7dc7ede51 100644 --- a/spec/requests/api/group_import_spec.rb +++ b/spec/requests/api/group_import_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::GroupImport do +RSpec.describe API::GroupImport do include WorkhorseHelpers let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/group_labels_spec.rb b/spec/requests/api/group_labels_spec.rb index 715c1255cb3..f965a845bbe 100644 --- a/spec/requests/api/group_labels_spec.rb +++ b/spec/requests/api/group_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::GroupLabels do +RSpec.describe API::GroupLabels do let(:user) { create(:user) } let(:group) { create(:group) } let(:subgroup) { create(:group, parent: group) } diff --git a/spec/requests/api/group_milestones_spec.rb b/spec/requests/api/group_milestones_spec.rb index 3e9b6246434..2b361f2b503 100644 --- a/spec/requests/api/group_milestones_spec.rb +++ b/spec/requests/api/group_milestones_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::GroupMilestones do +RSpec.describe API::GroupMilestones do let(:user) { create(:user) } let(:group) { create(:group, :private) } let(:project) { create(:project, namespace: group) } diff --git a/spec/requests/api/group_variables_spec.rb b/spec/requests/api/group_variables_spec.rb index a5b48985df5..c6d6ae1615b 100644 --- a/spec/requests/api/group_variables_spec.rb +++ b/spec/requests/api/group_variables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::GroupVariables do +RSpec.describe API::GroupVariables do let(:group) { create(:group) } let(:user) { create(:user) } diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb index 9a449499576..04bf529b74b 100644 --- a/spec/requests/api/groups_spec.rb +++ b/spec/requests/api/groups_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Groups do +RSpec.describe API::Groups do include GroupAPIHelpers include UploadHelpers diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb index d65c89f48ea..12cd5ace84e 100644 --- a/spec/requests/api/helpers_spec.rb +++ b/spec/requests/api/helpers_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require 'raven/transports/dummy' require_relative '../../../config/initializers/sentry' -describe API::Helpers do +RSpec.describe API::Helpers do include API::APIGuard::HelperMethods include described_class include TermsHelper diff --git a/spec/requests/api/import_github_spec.rb b/spec/requests/api/import_github_spec.rb index ecdb02beeb0..72f273d7a39 100644 --- a/spec/requests/api/import_github_spec.rb +++ b/spec/requests/api/import_github_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ImportGithub do +RSpec.describe API::ImportGithub do let(:token) { "asdasd12345" } let(:provider) { :github } let(:access_params) { { github_access_token: token } } diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb index 1d79e9cba13..7d219954e9d 100644 --- a/spec/requests/api/internal/base_spec.rb +++ b/spec/requests/api/internal/base_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Internal::Base do +RSpec.describe API::Internal::Base do let_it_be(:user, reload: true) { create(:user) } let_it_be(:project, reload: true) { create(:project, :repository, :wiki_repo) } let_it_be(:personal_snippet) { create(:personal_snippet, :repository, author: user) } diff --git a/spec/requests/api/internal/pages_spec.rb b/spec/requests/api/internal/pages_spec.rb index fecf15c29c2..48fc95b6574 100644 --- a/spec/requests/api/internal/pages_spec.rb +++ b/spec/requests/api/internal/pages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Internal::Pages do +RSpec.describe API::Internal::Pages do let(:auth_headers) do jwt_token = JWT.encode({ 'iss' => 'gitlab-pages' }, Gitlab::Pages.secret, 'HS256') { Gitlab::Pages::INTERNAL_API_REQUEST_HEADER => jwt_token } diff --git a/spec/requests/api/issues/get_group_issues_spec.rb b/spec/requests/api/issues/get_group_issues_spec.rb index 5c925d2a32e..b53fac3679d 100644 --- a/spec/requests/api/issues/get_group_issues_spec.rb +++ b/spec/requests/api/issues/get_group_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Issues do +RSpec.describe API::Issues do let_it_be(:user2) { create(:user) } let_it_be(:admin) { create(:user, :admin) } let_it_be(:non_member) { create(:user) } diff --git a/spec/requests/api/issues/get_project_issues_spec.rb b/spec/requests/api/issues/get_project_issues_spec.rb index 4a728c81215..7ff07bf580d 100644 --- a/spec/requests/api/issues/get_project_issues_spec.rb +++ b/spec/requests/api/issues/get_project_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Issues do +RSpec.describe API::Issues do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project, :public, :repository, creator_id: user.id, namespace: user.namespace) } let_it_be(:private_mrs_project) do diff --git a/spec/requests/api/issues/issues_spec.rb b/spec/requests/api/issues/issues_spec.rb index 315396c89c3..05d14c3cd4d 100644 --- a/spec/requests/api/issues/issues_spec.rb +++ b/spec/requests/api/issues/issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Issues do +RSpec.describe API::Issues do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project, :public, :repository, creator_id: user.id, namespace: user.namespace) } let_it_be(:private_mrs_project) do diff --git a/spec/requests/api/issues/post_projects_issues_spec.rb b/spec/requests/api/issues/post_projects_issues_spec.rb index 2e1e5d3204e..e2f1bb2cd1a 100644 --- a/spec/requests/api/issues/post_projects_issues_spec.rb +++ b/spec/requests/api/issues/post_projects_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Issues do +RSpec.describe API::Issues do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) do create(:project, :public, creator_id: user.id, namespace: user.namespace) diff --git a/spec/requests/api/issues/put_projects_issues_spec.rb b/spec/requests/api/issues/put_projects_issues_spec.rb index 62a4d3b48b2..dac721cbea0 100644 --- a/spec/requests/api/issues/put_projects_issues_spec.rb +++ b/spec/requests/api/issues/put_projects_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Issues do +RSpec.describe API::Issues do let_it_be(:user) { create(:user) } let_it_be(:owner) { create(:owner) } let(:user2) { create(:user) } diff --git a/spec/requests/api/jobs_spec.rb b/spec/requests/api/jobs_spec.rb index 18b5c00d64f..a1445e3740a 100644 --- a/spec/requests/api/jobs_spec.rb +++ b/spec/requests/api/jobs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Jobs do +RSpec.describe API::Jobs do include HttpIOHelpers shared_examples 'a job with artifacts and trace' do |result_is_array: true| diff --git a/spec/requests/api/keys_spec.rb b/spec/requests/api/keys_spec.rb index 089ee22982c..49b8f4a8520 100644 --- a/spec/requests/api/keys_spec.rb +++ b/spec/requests/api/keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Keys do +RSpec.describe API::Keys do let(:user) { create(:user) } let(:admin) { create(:admin) } let(:key) { create(:key, user: user, expires_at: 1.day.from_now) } diff --git a/spec/requests/api/labels_spec.rb b/spec/requests/api/labels_spec.rb index 697f22e5f29..fc674fca9b2 100644 --- a/spec/requests/api/labels_spec.rb +++ b/spec/requests/api/labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Labels do +RSpec.describe API::Labels do def put_labels_api(route_type, user, spec_params, request_params = {}) if route_type == :deprecated put api("/projects/#{project.id}/labels", user), diff --git a/spec/requests/api/lint_spec.rb b/spec/requests/api/lint_spec.rb index 71c2619d898..4c60c8bd2a3 100644 --- a/spec/requests/api/lint_spec.rb +++ b/spec/requests/api/lint_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Lint do +RSpec.describe API::Lint do describe 'POST /ci/lint' do context 'with valid .gitlab-ci.yaml content' do let(:yaml_content) do diff --git a/spec/requests/api/markdown_spec.rb b/spec/requests/api/markdown_spec.rb index 53e43430b1f..35d91963ac9 100644 --- a/spec/requests/api/markdown_spec.rb +++ b/spec/requests/api/markdown_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe API::Markdown do +RSpec.describe API::Markdown do describe "POST /markdown" do let(:user) {} # No-op. It gets overwritten in the contexts below. diff --git a/spec/requests/api/members_spec.rb b/spec/requests/api/members_spec.rb index 0ecef26c27a..db910c6f097 100644 --- a/spec/requests/api/members_spec.rb +++ b/spec/requests/api/members_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Members do +RSpec.describe API::Members do let(:maintainer) { create(:user, username: 'maintainer_user') } let(:developer) { create(:user) } let(:access_requester) { create(:user) } diff --git a/spec/requests/api/merge_request_diffs_spec.rb b/spec/requests/api/merge_request_diffs_spec.rb index d00bc4a6dde..3f41a7a034d 100644 --- a/spec/requests/api/merge_request_diffs_spec.rb +++ b/spec/requests/api/merge_request_diffs_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe API::MergeRequestDiffs, 'MergeRequestDiffs' do +RSpec.describe API::MergeRequestDiffs, 'MergeRequestDiffs' do let!(:user) { create(:user) } let!(:merge_request) { create(:merge_request, importing: true) } let!(:project) { merge_request.target_project } diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 7a0077f853a..803178d590f 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe API::MergeRequests do +RSpec.describe API::MergeRequests do include ProjectForksHelper let(:base_time) { Time.now } diff --git a/spec/requests/api/metrics/dashboard/annotations_spec.rb b/spec/requests/api/metrics/dashboard/annotations_spec.rb index 6377ef2435a..07de2925ee2 100644 --- a/spec/requests/api/metrics/dashboard/annotations_spec.rb +++ b/spec/requests/api/metrics/dashboard/annotations_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Metrics::Dashboard::Annotations do +RSpec.describe API::Metrics::Dashboard::Annotations do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :private, :repository, namespace: user.namespace) } let_it_be(:environment) { create(:environment, project: project) } diff --git a/spec/requests/api/metrics/user_starred_dashboards_spec.rb b/spec/requests/api/metrics/user_starred_dashboards_spec.rb index 8f9394a0e20..533dff05f27 100644 --- a/spec/requests/api/metrics/user_starred_dashboards_spec.rb +++ b/spec/requests/api/metrics/user_starred_dashboards_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Metrics::UserStarredDashboards do +RSpec.describe API::Metrics::UserStarredDashboards do let_it_be(:user) { create(:user) } let_it_be(:dashboard_yml) { fixture_file('lib/gitlab/metrics/dashboard/sample_dashboard.yml') } let_it_be(:dashboard) { '.gitlab/dashboards/find&seek.yml' } diff --git a/spec/requests/api/namespaces_spec.rb b/spec/requests/api/namespaces_spec.rb index 68fffc638df..2ac76d469d5 100644 --- a/spec/requests/api/namespaces_spec.rb +++ b/spec/requests/api/namespaces_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Namespaces do +RSpec.describe API::Namespaces do let(:admin) { create(:admin) } let(:user) { create(:user) } let!(:group1) { create(:group, name: 'group.one') } diff --git a/spec/requests/api/notes_spec.rb b/spec/requests/api/notes_spec.rb index 797dd3bb4e2..1510d31a1a6 100644 --- a/spec/requests/api/notes_spec.rb +++ b/spec/requests/api/notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Notes do +RSpec.describe API::Notes do let!(:user) { create(:user) } let!(:project) { create(:project, :public) } let(:private_user) { create(:user) } diff --git a/spec/requests/api/notification_settings_spec.rb b/spec/requests/api/notification_settings_spec.rb index 2dfde4c8ec9..73cb4948524 100644 --- a/spec/requests/api/notification_settings_spec.rb +++ b/spec/requests/api/notification_settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::NotificationSettings do +RSpec.describe API::NotificationSettings do let(:user) { create(:user) } let!(:group) { create(:group) } let!(:project) { create(:project, :public, creator_id: user.id, namespace: group) } diff --git a/spec/requests/api/oauth_tokens_spec.rb b/spec/requests/api/oauth_tokens_spec.rb index 5e775841f12..f5971054b3c 100644 --- a/spec/requests/api/oauth_tokens_spec.rb +++ b/spec/requests/api/oauth_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'OAuth tokens' do +RSpec.describe 'OAuth tokens' do include HttpBasicAuthHelpers context 'Resource Owner Password Credentials' do diff --git a/spec/requests/api/pages/internal_access_spec.rb b/spec/requests/api/pages/internal_access_spec.rb index ee55d1c54b7..c894a2d3ca4 100644 --- a/spec/requests/api/pages/internal_access_spec.rb +++ b/spec/requests/api/pages/internal_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Internal Project Pages Access" do +RSpec.describe "Internal Project Pages Access" do using RSpec::Parameterized::TableSyntax include AccessMatchers diff --git a/spec/requests/api/pages/pages_spec.rb b/spec/requests/api/pages/pages_spec.rb index 62d43ecff16..53e732928ff 100644 --- a/spec/requests/api/pages/pages_spec.rb +++ b/spec/requests/api/pages/pages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Pages do +RSpec.describe API::Pages do let_it_be(:project) { create(:project, path: 'my.project', pages_https_only: false) } let_it_be(:admin) { create(:admin) } let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/pages/private_access_spec.rb b/spec/requests/api/pages/private_access_spec.rb index 146c6a389f3..ea5db691b14 100644 --- a/spec/requests/api/pages/private_access_spec.rb +++ b/spec/requests/api/pages/private_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Private Project Pages Access" do +RSpec.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 7d929e2a287..ae73cee91d5 100644 --- a/spec/requests/api/pages/public_access_spec.rb +++ b/spec/requests/api/pages/public_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Public Project Pages Access" do +RSpec.describe "Public Project Pages Access" do using RSpec::Parameterized::TableSyntax include AccessMatchers diff --git a/spec/requests/api/pages_domains_spec.rb b/spec/requests/api/pages_domains_spec.rb index 8c411233b27..b6838a39257 100644 --- a/spec/requests/api/pages_domains_spec.rb +++ b/spec/requests/api/pages_domains_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::PagesDomains do +RSpec.describe API::PagesDomains do let_it_be(:project) { create(:project, path: 'my.project', pages_https_only: false) } let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/pipeline_schedules_spec.rb b/spec/requests/api/pipeline_schedules_spec.rb index 98eaf36b14e..86f3ff54b83 100644 --- a/spec/requests/api/pipeline_schedules_spec.rb +++ b/spec/requests/api/pipeline_schedules_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::PipelineSchedules do +RSpec.describe API::PipelineSchedules do let_it_be(:developer) { create(:user) } let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :repository, public_builds: false) } diff --git a/spec/requests/api/pipelines_spec.rb b/spec/requests/api/pipelines_spec.rb index b175007ce0d..b9bc8eabf2c 100644 --- a/spec/requests/api/pipelines_spec.rb +++ b/spec/requests/api/pipelines_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Pipelines do +RSpec.describe API::Pipelines do let_it_be(:user) { create(:user) } let_it_be(:non_member) { create(:user) } diff --git a/spec/requests/api/project_clusters_spec.rb b/spec/requests/api/project_clusters_spec.rb index ed899e830e1..f01b3bc9d5f 100644 --- a/spec/requests/api/project_clusters_spec.rb +++ b/spec/requests/api/project_clusters_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectClusters do +RSpec.describe API::ProjectClusters do include KubernetesHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/project_container_repositories_spec.rb b/spec/requests/api/project_container_repositories_spec.rb index 471fc99117b..6cf0619cde4 100644 --- a/spec/requests/api/project_container_repositories_spec.rb +++ b/spec/requests/api/project_container_repositories_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectContainerRepositories do +RSpec.describe API::ProjectContainerRepositories do include ExclusiveLeaseHelpers let_it_be(:project) { create(:project, :private) } diff --git a/spec/requests/api/project_events_spec.rb b/spec/requests/api/project_events_spec.rb index f65c62f9402..f3e592f9796 100644 --- a/spec/requests/api/project_events_spec.rb +++ b/spec/requests/api/project_events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectEvents do +RSpec.describe API::ProjectEvents do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:private_project) { create(:project, :private, creator_id: user.id, namespace: user.namespace) } diff --git a/spec/requests/api/project_export_spec.rb b/spec/requests/api/project_export_spec.rb index 58034322a13..79c24dfbb6b 100644 --- a/spec/requests/api/project_export_spec.rb +++ b/spec/requests/api/project_export_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectExport, :clean_gitlab_redis_cache do +RSpec.describe API::ProjectExport, :clean_gitlab_redis_cache do let_it_be(:project) { create(:project) } let_it_be(:project_none) { create(:project) } let_it_be(:project_started) { create(:project) } diff --git a/spec/requests/api/project_hooks_spec.rb b/spec/requests/api/project_hooks_spec.rb index 4474f2f0577..8ab90e26a51 100644 --- a/spec/requests/api/project_hooks_spec.rb +++ b/spec/requests/api/project_hooks_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectHooks, 'ProjectHooks' do +RSpec.describe API::ProjectHooks, 'ProjectHooks' do let(:user) { create(:user) } let(:user3) { create(:user) } let!(:project) { create(:project, creator_id: user.id, namespace: user.namespace) } diff --git a/spec/requests/api/project_import_spec.rb b/spec/requests/api/project_import_spec.rb index 563acd0ece4..a6ae636996e 100644 --- a/spec/requests/api/project_import_spec.rb +++ b/spec/requests/api/project_import_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectImport do +RSpec.describe API::ProjectImport do include WorkhorseHelpers let(:user) { create(:user) } diff --git a/spec/requests/api/project_milestones_spec.rb b/spec/requests/api/project_milestones_spec.rb index c5911d51706..b238949ce47 100644 --- a/spec/requests/api/project_milestones_spec.rb +++ b/spec/requests/api/project_milestones_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectMilestones do +RSpec.describe API::ProjectMilestones do let(:user) { create(:user) } let!(:project) { create(:project, namespace: user.namespace ) } let!(:closed_milestone) { create(:closed_milestone, project: project, title: 'version1', description: 'closed milestone') } diff --git a/spec/requests/api/project_repository_storage_moves_spec.rb b/spec/requests/api/project_repository_storage_moves_spec.rb index 40966e31d0d..4c9e058ef13 100644 --- a/spec/requests/api/project_repository_storage_moves_spec.rb +++ b/spec/requests/api/project_repository_storage_moves_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectRepositoryStorageMoves do +RSpec.describe API::ProjectRepositoryStorageMoves do include AccessMatchersForRequest let_it_be(:user) { create(:admin) } diff --git a/spec/requests/api/project_snapshots_spec.rb b/spec/requests/api/project_snapshots_spec.rb index a54f317782b..f23e374407b 100644 --- a/spec/requests/api/project_snapshots_spec.rb +++ b/spec/requests/api/project_snapshots_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectSnapshots do +RSpec.describe API::ProjectSnapshots do include WorkhorseHelpers let(:project) { create(:project) } diff --git a/spec/requests/api/project_snippets_spec.rb b/spec/requests/api/project_snippets_spec.rb index 22189dc3299..e1fedd45b07 100644 --- a/spec/requests/api/project_snippets_spec.rb +++ b/spec/requests/api/project_snippets_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectSnippets do +RSpec.describe API::ProjectSnippets do let_it_be(:project) { create(:project, :public) } let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/project_statistics_spec.rb b/spec/requests/api/project_statistics_spec.rb index 89809a97b96..5f0cac403aa 100644 --- a/spec/requests/api/project_statistics_spec.rb +++ b/spec/requests/api/project_statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectStatistics do +RSpec.describe API::ProjectStatistics do let_it_be(:developer) { create(:user) } let_it_be(:public_project) { create(:project, :public) } diff --git a/spec/requests/api/project_templates_spec.rb b/spec/requests/api/project_templates_spec.rb index caeb465080e..59b2b09f0bf 100644 --- a/spec/requests/api/project_templates_spec.rb +++ b/spec/requests/api/project_templates_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProjectTemplates do +RSpec.describe API::ProjectTemplates do let_it_be(:public_project) { create(:project, :public, path: 'path.with.dot') } let_it_be(:private_project) { create(:project, :private) } let_it_be(:developer) { create(:user) } diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 6f0fe181991..a4224bd66d0 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -shared_examples 'languages and percentages JSON response' do +RSpec.shared_examples 'languages and percentages JSON response' do let(:expected_languages) { project.repository.languages.map { |language| language.values_at(:label, :value)}.to_h } before do @@ -46,7 +46,7 @@ shared_examples 'languages and percentages JSON response' do end end -describe API::Projects do +RSpec.describe API::Projects do include ProjectForksHelper let(:user) { create(:user) } diff --git a/spec/requests/api/protected_branches_spec.rb b/spec/requests/api/protected_branches_spec.rb index 9203e0ec819..8bcd493eb1f 100644 --- a/spec/requests/api/protected_branches_spec.rb +++ b/spec/requests/api/protected_branches_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProtectedBranches do +RSpec.describe API::ProtectedBranches do let(:user) { create(:user) } let!(:project) { create(:project, :repository) } let(:protected_name) { 'feature' } diff --git a/spec/requests/api/protected_tags_spec.rb b/spec/requests/api/protected_tags_spec.rb index 3bc8ecbee73..cc7261dafc9 100644 --- a/spec/requests/api/protected_tags_spec.rb +++ b/spec/requests/api/protected_tags_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ProtectedTags do +RSpec.describe API::ProtectedTags do let(:user) { create(:user) } let!(:project) { create(:project, :repository) } let(:project2) { create(:project, path: 'project2', namespace: user.namespace) } diff --git a/spec/requests/api/release/links_spec.rb b/spec/requests/api/release/links_spec.rb index cf2043ecc74..82d0d64eba4 100644 --- a/spec/requests/api/release/links_spec.rb +++ b/spec/requests/api/release/links_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Release::Links do +RSpec.describe API::Release::Links do let(:project) { create(:project, :repository, :private) } let(:maintainer) { create(:user) } let(:reporter) { create(:user) } diff --git a/spec/requests/api/releases_spec.rb b/spec/requests/api/releases_spec.rb index f4cb7f25990..5e8353d74c3 100644 --- a/spec/requests/api/releases_spec.rb +++ b/spec/requests/api/releases_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Releases do +RSpec.describe API::Releases do let(:project) { create(:project, :repository, :private) } let(:maintainer) { create(:user) } let(:reporter) { create(:user) } diff --git a/spec/requests/api/remote_mirrors_spec.rb b/spec/requests/api/remote_mirrors_spec.rb index 3029b8443b0..436efb708fd 100644 --- a/spec/requests/api/remote_mirrors_spec.rb +++ b/spec/requests/api/remote_mirrors_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::RemoteMirrors do +RSpec.describe API::RemoteMirrors do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :repository, :remote_mirror) } let_it_be(:developer) { create(:user) { |u| project.add_developer(u) } } diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb index 55243e83017..27e6c3d42bb 100644 --- a/spec/requests/api/repositories_spec.rb +++ b/spec/requests/api/repositories_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require 'mime/types' -describe API::Repositories do +RSpec.describe API::Repositories do include RepoHelpers include WorkhorseHelpers diff --git a/spec/requests/api/resource_label_events_spec.rb b/spec/requests/api/resource_label_events_spec.rb index 7619399458a..a4a70d89812 100644 --- a/spec/requests/api/resource_label_events_spec.rb +++ b/spec/requests/api/resource_label_events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ResourceLabelEvents do +RSpec.describe API::ResourceLabelEvents do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project, :public, namespace: user.namespace) } let_it_be(:label) { create(:label, project: project) } diff --git a/spec/requests/api/resource_milestone_events_spec.rb b/spec/requests/api/resource_milestone_events_spec.rb index b2e92fde5ee..5c81c2180d7 100644 --- a/spec/requests/api/resource_milestone_events_spec.rb +++ b/spec/requests/api/resource_milestone_events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::ResourceMilestoneEvents do +RSpec.describe API::ResourceMilestoneEvents do let!(:user) { create(:user) } let!(:project) { create(:project, :public, namespace: user.namespace) } let!(:milestone) { create(:milestone, project: project) } diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index fc0d4b91aa2..c7d068a1a78 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Runner, :clean_gitlab_redis_shared_state do +RSpec.describe API::Runner, :clean_gitlab_redis_shared_state do include StubGitlabCalls include RedisHelpers include WorkhorseHelpers diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb index 3613cf116a0..0726ab5e3d8 100644 --- a/spec/requests/api/runners_spec.rb +++ b/spec/requests/api/runners_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Runners do +RSpec.describe API::Runners do let_it_be(:admin) { create(:user, :admin) } let_it_be(:user) { create(:user) } let_it_be(:user2) { create(:user) } diff --git a/spec/requests/api/search_spec.rb b/spec/requests/api/search_spec.rb index a02d804ee9b..1a93be98a67 100644 --- a/spec/requests/api/search_spec.rb +++ b/spec/requests/api/search_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Search do +RSpec.describe API::Search do let_it_be(:user) { create(:user) } let_it_be(:group) { create(:group) } let_it_be(:project, reload: true) { create(:project, :wiki_repo, :public, name: 'awesome project', group: group) } diff --git a/spec/requests/api/services_spec.rb b/spec/requests/api/services_spec.rb index 53265574e6a..5528a0c094f 100644 --- a/spec/requests/api/services_spec.rb +++ b/spec/requests/api/services_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe API::Services do +RSpec.describe API::Services do let_it_be(:user) { create(:user) } let_it_be(:user2) { create(:user) } diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb index e6dd1fecb69..1df4d7ea9f6 100644 --- a/spec/requests/api/settings_spec.rb +++ b/spec/requests/api/settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Settings, 'Settings' do +RSpec.describe API::Settings, 'Settings' do let(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/sidekiq_metrics_spec.rb b/spec/requests/api/sidekiq_metrics_spec.rb index 705ae29d5d8..23ac2ea5c0b 100644 --- a/spec/requests/api/sidekiq_metrics_spec.rb +++ b/spec/requests/api/sidekiq_metrics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::SidekiqMetrics do +RSpec.describe API::SidekiqMetrics do let(:admin) { create(:user, :admin) } describe 'GET sidekiq/*' do diff --git a/spec/requests/api/snippets_spec.rb b/spec/requests/api/snippets_spec.rb index c12c95ae2e0..e5eb9b45f4b 100644 --- a/spec/requests/api/snippets_spec.rb +++ b/spec/requests/api/snippets_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Snippets do +RSpec.describe API::Snippets do let_it_be(:user) { create(:user) } describe 'GET /snippets/' do diff --git a/spec/requests/api/statistics_spec.rb b/spec/requests/api/statistics_spec.rb index 5aea5c225a0..eab97b6916e 100644 --- a/spec/requests/api/statistics_spec.rb +++ b/spec/requests/api/statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Statistics, 'Statistics' do +RSpec.describe API::Statistics, 'Statistics' do include ProjectForksHelper tables_to_analyze = %w[ projects diff --git a/spec/requests/api/submodules_spec.rb b/spec/requests/api/submodules_spec.rb index 2604dc18005..6b141d6d036 100644 --- a/spec/requests/api/submodules_spec.rb +++ b/spec/requests/api/submodules_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Submodules do +RSpec.describe API::Submodules do let(:user) { create(:user) } let!(:project) { create(:project, :repository, namespace: user.namespace ) } let(:guest) { create(:user) { |u| project.add_guest(u) } } diff --git a/spec/requests/api/suggestions_spec.rb b/spec/requests/api/suggestions_spec.rb index ffb8c811622..34d3c54d700 100644 --- a/spec/requests/api/suggestions_spec.rb +++ b/spec/requests/api/suggestions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Suggestions do +RSpec.describe API::Suggestions do let(:project) { create(:project, :repository) } let(:user) { create(:user) } diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb index 609aa615d33..01b46053d52 100644 --- a/spec/requests/api/system_hooks_spec.rb +++ b/spec/requests/api/system_hooks_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::SystemHooks do +RSpec.describe API::SystemHooks do include StubRequests let(:user) { create(:user) } diff --git a/spec/requests/api/tags_spec.rb b/spec/requests/api/tags_spec.rb index 694802ce1b8..b029c0f5793 100644 --- a/spec/requests/api/tags_spec.rb +++ b/spec/requests/api/tags_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Tags do +RSpec.describe API::Tags do let(:user) { create(:user) } let(:guest) { create(:user).tap { |u| project.add_guest(u) } } let(:project) { create(:project, :repository, creator: user, path: 'my.project') } diff --git a/spec/requests/api/task_completion_status_spec.rb b/spec/requests/api/task_completion_status_spec.rb index 4dd1e27bd4b..97ce858ba12 100644 --- a/spec/requests/api/task_completion_status_spec.rb +++ b/spec/requests/api/task_completion_status_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'task completion status response' do +RSpec.describe 'task completion status response' do let_it_be(:user) { create(:user) } let_it_be(:project) do create(:project, :public, creator_id: user.id, namespace: user.namespace) diff --git a/spec/requests/api/templates_spec.rb b/spec/requests/api/templates_spec.rb index fae338b4ca3..e1c5bfd82c4 100644 --- a/spec/requests/api/templates_spec.rb +++ b/spec/requests/api/templates_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Templates do +RSpec.describe API::Templates do context 'the Template Entity' do before do get api('/templates/gitignores/Ruby') diff --git a/spec/requests/api/terraform/state_spec.rb b/spec/requests/api/terraform/state_spec.rb index ec9db5566e3..2ddbfe6fa95 100644 --- a/spec/requests/api/terraform/state_spec.rb +++ b/spec/requests/api/terraform/state_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Terraform::State do +RSpec.describe API::Terraform::State do include HttpBasicAuthHelpers let_it_be(:project) { create(:project) } diff --git a/spec/requests/api/todos_spec.rb b/spec/requests/api/todos_spec.rb index 0bdc71a30e9..dfd0e13d84c 100644 --- a/spec/requests/api/todos_spec.rb +++ b/spec/requests/api/todos_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Todos do +RSpec.describe API::Todos do let_it_be(:group) { create(:group) } let_it_be(:project_1) { create(:project, :repository, group: group) } let_it_be(:project_2) { create(:project) } diff --git a/spec/requests/api/triggers_spec.rb b/spec/requests/api/triggers_spec.rb index 19b01cb7913..c51358bf659 100644 --- a/spec/requests/api/triggers_spec.rb +++ b/spec/requests/api/triggers_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Triggers do +RSpec.describe API::Triggers do let_it_be(:user) { create(:user) } let_it_be(:user2) { create(:user) } diff --git a/spec/requests/api/user_counts_spec.rb b/spec/requests/api/user_counts_spec.rb index 688dfe11115..94e25d647fc 100644 --- a/spec/requests/api/user_counts_spec.rb +++ b/spec/requests/api/user_counts_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::UserCounts do +RSpec.describe API::UserCounts do let(:user) { create(:user) } let(:project) { create(:project, :public) } diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index e780f67bcab..bae8e0cdec2 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Users, :do_not_mock_admin_mode do +RSpec.describe API::Users, :do_not_mock_admin_mode do let_it_be(:admin) { create(:admin) } let_it_be(:user, reload: true) { create(:user, username: 'user.with.dot') } let_it_be(:key) { create(:key, user: user) } diff --git a/spec/requests/api/variables_spec.rb b/spec/requests/api/variables_spec.rb index f209a1d2e6e..0cedfe578e3 100644 --- a/spec/requests/api/variables_spec.rb +++ b/spec/requests/api/variables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Variables do +RSpec.describe API::Variables do let(:user) { create(:user) } let(:user2) { create(:user) } let!(:project) { create(:project, creator_id: user.id) } diff --git a/spec/requests/api/version_spec.rb b/spec/requests/api/version_spec.rb index 9eb8c03e273..a0a0f66c8d1 100644 --- a/spec/requests/api/version_spec.rb +++ b/spec/requests/api/version_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe API::Version do +RSpec.describe API::Version do shared_examples_for 'GET /version' do context 'when unauthenticated' do it 'returns authentication error' do diff --git a/spec/requests/api/wikis_spec.rb b/spec/requests/api/wikis_spec.rb index 43a5cb446bb..ea22e442127 100644 --- a/spec/requests/api/wikis_spec.rb +++ b/spec/requests/api/wikis_spec.rb @@ -12,7 +12,7 @@ require 'spec_helper' # - maintainer # because they are 3 edge cases of using wiki pages. -describe API::Wikis do +RSpec.describe API::Wikis do include WorkhorseHelpers let(:user) { create(:user) } diff --git a/spec/requests/boards/lists_controller_spec.rb b/spec/requests/boards/lists_controller_spec.rb index 7451ad93efd..4d9f1dace4d 100644 --- a/spec/requests/boards/lists_controller_spec.rb +++ b/spec/requests/boards/lists_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::ListsController do +RSpec.describe Boards::ListsController do describe '#index' do let(:board) { create(:board) } let(:user) { board.project.owner } diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb index 183a3545cf2..d387c6df4cf 100644 --- a/spec/requests/git_http_spec.rb +++ b/spec/requests/git_http_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Git HTTP requests' do +RSpec.describe 'Git HTTP requests' do include ProjectForksHelper include TermsHelper include GitHttpHelpers diff --git a/spec/requests/groups/milestones_controller_spec.rb b/spec/requests/groups/milestones_controller_spec.rb index 1c6743dc678..2c4d97ec4c3 100644 --- a/spec/requests/groups/milestones_controller_spec.rb +++ b/spec/requests/groups/milestones_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Groups::MilestonesController do +RSpec.describe Groups::MilestonesController do context 'N+1 DB queries' do let(:user) { create(:user) } let!(:public_group) { create(:group, :public) } diff --git a/spec/requests/groups/registry/repositories_controller_spec.rb b/spec/requests/groups/registry/repositories_controller_spec.rb index ab59b006be7..89cbd3e4100 100644 --- a/spec/requests/groups/registry/repositories_controller_spec.rb +++ b/spec/requests/groups/registry/repositories_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Groups::Registry::RepositoriesController do +RSpec.describe Groups::Registry::RepositoriesController do let_it_be(:group, reload: true) { create(:group) } let_it_be(:user) { create(:user) } diff --git a/spec/requests/health_controller_spec.rb b/spec/requests/health_controller_spec.rb index 6ee716e0e89..8b0492a27b9 100644 --- a/spec/requests/health_controller_spec.rb +++ b/spec/requests/health_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe HealthController do +RSpec.describe HealthController do include StubENV let(:token) { Gitlab::CurrentSettings.health_check_access_token } diff --git a/spec/requests/import/gitlab_groups_controller_spec.rb b/spec/requests/import/gitlab_groups_controller_spec.rb index 35f2bf0c2f7..1ca1df2998f 100644 --- a/spec/requests/import/gitlab_groups_controller_spec.rb +++ b/spec/requests/import/gitlab_groups_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Import::GitlabGroupsController do +RSpec.describe Import::GitlabGroupsController do include WorkhorseHelpers let(:import_path) { "#{Dir.tmpdir}/gitlab_groups_controller_spec" } diff --git a/spec/requests/import/gitlab_projects_controller_spec.rb b/spec/requests/import/gitlab_projects_controller_spec.rb index f16755e9766..c1ac5a9f2c8 100644 --- a/spec/requests/import/gitlab_projects_controller_spec.rb +++ b/spec/requests/import/gitlab_projects_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Import::GitlabProjectsController do +RSpec.describe Import::GitlabProjectsController do include WorkhorseHelpers let(:workhorse_token) { JWT.encode({ 'iss' => 'gitlab-workhorse' }, Gitlab::Workhorse.secret, 'HS256') } diff --git a/spec/requests/jwt_controller_spec.rb b/spec/requests/jwt_controller_spec.rb index 617587e2fa6..fe6c0f0a556 100644 --- a/spec/requests/jwt_controller_spec.rb +++ b/spec/requests/jwt_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe JwtController do +RSpec.describe JwtController do include_context 'parsed logs' let(:service) { double(execute: {}) } diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb index f3fa5e36fec..f7771c7b0f9 100644 --- a/spec/requests/lfs_http_spec.rb +++ b/spec/requests/lfs_http_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'Git LFS API and storage' do +RSpec.describe 'Git LFS API and storage' do include LfsHttpHelpers include ProjectForksHelper include WorkhorseHelpers diff --git a/spec/requests/lfs_locks_api_spec.rb b/spec/requests/lfs_locks_api_spec.rb index 41cf1a80205..34e345cb1cf 100644 --- a/spec/requests/lfs_locks_api_spec.rb +++ b/spec/requests/lfs_locks_api_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Git LFS File Locking API' do +RSpec.describe 'Git LFS File Locking API' do include WorkhorseHelpers let(:project) { create(:project) } diff --git a/spec/requests/oauth_tokens_spec.rb b/spec/requests/oauth_tokens_spec.rb index bb1c25d686e..6d944bbc783 100644 --- a/spec/requests/oauth_tokens_spec.rb +++ b/spec/requests/oauth_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'OAuth Tokens requests' do +RSpec.describe 'OAuth Tokens requests' do let(:user) { create :user } let(:application) { create :oauth_application, scopes: 'api' } diff --git a/spec/requests/openid_connect_spec.rb b/spec/requests/openid_connect_spec.rb index 785ab98a3d0..8da64932ddd 100644 --- a/spec/requests/openid_connect_spec.rb +++ b/spec/requests/openid_connect_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'OpenID Connect requests' do +RSpec.describe 'OpenID Connect requests' do let(:user) do create( :user, diff --git a/spec/requests/profiles/notifications_controller_spec.rb b/spec/requests/profiles/notifications_controller_spec.rb index 0b2741677ab..d60cee00aef 100644 --- a/spec/requests/profiles/notifications_controller_spec.rb +++ b/spec/requests/profiles/notifications_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'view user notifications' do +RSpec.describe 'view user notifications' do let(:user) do create(:user) do |user| user.emails.create(email: 'original@example.com', confirmed_at: Time.current) diff --git a/spec/requests/projects/cycle_analytics_events_spec.rb b/spec/requests/projects/cycle_analytics_events_spec.rb index 773f243e733..8c3058d405c 100644 --- a/spec/requests/projects/cycle_analytics_events_spec.rb +++ b/spec/requests/projects/cycle_analytics_events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'value stream analytics events' do +RSpec.describe 'value stream 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) } diff --git a/spec/requests/projects/merge_requests/creations_spec.rb b/spec/requests/projects/merge_requests/creations_spec.rb index d192e1bca7f..0a3e663444f 100644 --- a/spec/requests/projects/merge_requests/creations_spec.rb +++ b/spec/requests/projects/merge_requests/creations_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'merge requests creations' do +RSpec.describe 'merge requests creations' do describe 'GET /:namespace/:project/merge_requests/new' do include ProjectForksHelper diff --git a/spec/requests/projects/merge_requests_discussions_spec.rb b/spec/requests/projects/merge_requests_discussions_spec.rb index 94e9c81bc3b..6ec586ed22c 100644 --- a/spec/requests/projects/merge_requests_discussions_spec.rb +++ b/spec/requests/projects/merge_requests_discussions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'merge requests discussions' do +RSpec.describe 'merge requests discussions' do # Further tests can be found at merge_requests_controller_spec.rb describe 'GET /:namespace/:project/-/merge_requests/:iid/discussions' do let(:project) { create(:project, :repository) } diff --git a/spec/requests/projects/uploads_spec.rb b/spec/requests/projects/uploads_spec.rb index aca4644289d..de5ef36be7e 100644 --- a/spec/requests/projects/uploads_spec.rb +++ b/spec/requests/projects/uploads_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'File uploads' do +RSpec.describe 'File uploads' do include WorkhorseHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/requests/rack_attack_global_spec.rb b/spec/requests/rack_attack_global_spec.rb index 175c5dd0088..106515a6b13 100644 --- a/spec/requests/rack_attack_global_spec.rb +++ b/spec/requests/rack_attack_global_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Rack Attack global throttles' do +RSpec.describe 'Rack Attack global throttles' do include RackAttackSpecHelpers let(:settings) { Gitlab::CurrentSettings.current_application_settings } diff --git a/spec/requests/request_profiler_spec.rb b/spec/requests/request_profiler_spec.rb index 36ccfc6b400..7f9999bf3d2 100644 --- a/spec/requests/request_profiler_spec.rb +++ b/spec/requests/request_profiler_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Request Profiler' do +RSpec.describe 'Request Profiler' do let(:user) { create(:user) } shared_examples 'profiling a request' do |profile_type, extension| diff --git a/spec/requests/self_monitoring_project_spec.rb b/spec/requests/self_monitoring_project_spec.rb index 6a0258c349f..5844a27da17 100644 --- a/spec/requests/self_monitoring_project_spec.rb +++ b/spec/requests/self_monitoring_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Self-Monitoring project requests' do +RSpec.describe 'Self-Monitoring project requests' do let(:admin) { create(:admin) } describe 'POST #create_self_monitoring_project' do diff --git a/spec/requests/sessions_spec.rb b/spec/requests/sessions_spec.rb index 6697700c37d..95df181b7b0 100644 --- a/spec/requests/sessions_spec.rb +++ b/spec/requests/sessions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Sessions' do +RSpec.describe 'Sessions' do context 'authentication', :allow_forgery_protection do let(:user) { create(:user) } diff --git a/spec/requests/user_activity_spec.rb b/spec/requests/user_activity_spec.rb index b24760d475b..6f0726dbdc9 100644 --- a/spec/requests/user_activity_spec.rb +++ b/spec/requests/user_activity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Update of user activity' do +RSpec.describe 'Update of user activity' do let(:user) { create(:user, last_activity_on: nil) } before do diff --git a/spec/requests/user_avatar_spec.rb b/spec/requests/user_avatar_spec.rb index 66c7ce4d533..1397741af18 100644 --- a/spec/requests/user_avatar_spec.rb +++ b/spec/requests/user_avatar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Loading a user avatar' do +RSpec.describe 'Loading a user avatar' do let(:user) { create(:user, :with_avatar) } context 'when logged in' do diff --git a/spec/requests/user_spoofs_ip_spec.rb b/spec/requests/user_spoofs_ip_spec.rb index 8da15665132..833dae78529 100644 --- a/spec/requests/user_spoofs_ip_spec.rb +++ b/spec/requests/user_spoofs_ip_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User spoofs their IP' do +RSpec.describe 'User spoofs their IP' do it 'raises a 400 error' do get '/nonexistent', headers: { 'Client-Ip' => '1.2.3.4', 'X-Forwarded-For' => '5.6.7.8' } diff --git a/spec/routing/admin/serverless/domains_controller_routing_spec.rb b/spec/routing/admin/serverless/domains_controller_routing_spec.rb index 18c0db6add1..60b60809f4d 100644 --- a/spec/routing/admin/serverless/domains_controller_routing_spec.rb +++ b/spec/routing/admin/serverless/domains_controller_routing_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Admin::Serverless::DomainsController do +RSpec.describe Admin::Serverless::DomainsController do it 'routes to #index' do expect(get: '/admin/serverless/domains').to route_to('admin/serverless/domains#index') end diff --git a/spec/routing/admin_routing_spec.rb b/spec/routing/admin_routing_spec.rb index 25216b0c712..13e371ad68a 100644 --- a/spec/routing/admin_routing_spec.rb +++ b/spec/routing/admin_routing_spec.rb @@ -11,7 +11,7 @@ require 'spec_helper' # admin_user GET /admin/users/:id(.:format) admin/users#show # PUT /admin/users/:id(.:format) admin/users#update # DELETE /admin/users/:id(.:format) admin/users#destroy -describe Admin::UsersController, "routing" do +RSpec.describe Admin::UsersController, "routing" do it "to #block" do expect(put("/admin/users/1/block")).to route_to('admin/users#block', id: '1') end @@ -58,7 +58,7 @@ end # admin_project GET /admin/projects/:id(.:format) admin/projects#show {id: /[^\/]+/} # PUT /admin/projects/:id(.:format) admin/projects#update {id: /[^\/]+/} # DELETE /admin/projects/:id(.:format) admin/projects#destroy {id: /[^\/]+/} -describe Admin::ProjectsController, "routing" do +RSpec.describe Admin::ProjectsController, "routing" do it "to #index" do expect(get("/admin/projects")).to route_to('admin/projects#index') end @@ -75,7 +75,7 @@ end # admin_hook DELETE /admin/hooks/:id(.:format) admin/hooks#destroy # PUT /admin/hooks/:id(.:format) admin/hooks#update # edit_admin_hook GET /admin/hooks/:id(.:format) admin/hooks#edit -describe Admin::HooksController, "routing" do +RSpec.describe Admin::HooksController, "routing" do it "to #test" do expect(post("/admin/hooks/1/test")).to route_to('admin/hooks#test', id: '1') end @@ -103,7 +103,7 @@ end # admin_hook_hook_log_retry POST /admin/hooks/:hook_id/hook_logs/:id/retry(.:format) admin/hook_logs#retry # admin_hook_hook_log GET /admin/hooks/:hook_id/hook_logs/:id(.:format) admin/hook_logs#show -describe Admin::HookLogsController, 'routing' do +RSpec.describe Admin::HookLogsController, 'routing' do it 'to #retry' do expect(post('/admin/hooks/1/hook_logs/1/retry')).to route_to('admin/hook_logs#retry', hook_id: '1', id: '1') end @@ -114,27 +114,27 @@ describe Admin::HookLogsController, 'routing' do end # admin_background_jobs GET /admin/background_jobs(.:format) admin/background_jobs#show -describe Admin::BackgroundJobsController, "routing" do +RSpec.describe Admin::BackgroundJobsController, "routing" do it "to #show" do expect(get("/admin/background_jobs")).to route_to('admin/background_jobs#show') end end # admin_root /admin(.:format) admin/dashboard#index -describe Admin::DashboardController, "routing" do +RSpec.describe Admin::DashboardController, "routing" do it "to #index" do expect(get("/admin")).to route_to('admin/dashboard#index') end end # admin_health_check GET /admin/health_check(.:format) admin/health_check#show -describe Admin::HealthCheckController, "routing" do +RSpec.describe Admin::HealthCheckController, "routing" do it "to #show" do expect(get("/admin/health_check")).to route_to('admin/health_check#show') end end -describe Admin::GroupsController, "routing" do +RSpec.describe Admin::GroupsController, "routing" do let(:name) { 'complex.group-namegit' } it "to #index" do @@ -151,7 +151,7 @@ describe Admin::GroupsController, "routing" do end end -describe Admin::SessionsController, "routing" do +RSpec.describe Admin::SessionsController, "routing" do it "to #new" do expect(get("/admin/session/new")).to route_to('admin/sessions#new') end diff --git a/spec/routing/environments_spec.rb b/spec/routing/environments_spec.rb index 46d4f31dd31..5ba02c384e2 100644 --- a/spec/routing/environments_spec.rb +++ b/spec/routing/environments_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'environments routing' do +RSpec.describe 'environments routing' do let(:project) { create(:project) } let(:environment) do diff --git a/spec/routing/git_http_routing_spec.rb b/spec/routing/git_http_routing_spec.rb index af14e5f81cb..e5216d99eb9 100644 --- a/spec/routing/git_http_routing_spec.rb +++ b/spec/routing/git_http_routing_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'git_http routing' do +RSpec.describe 'git_http routing' do include RSpec::Rails::RequestExampleGroup describe 'wiki.git routing', 'routing' do diff --git a/spec/routing/group_routing_spec.rb b/spec/routing/group_routing_spec.rb index 2a8454a276d..63193649bc7 100644 --- a/spec/routing/group_routing_spec.rb +++ b/spec/routing/group_routing_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Groups", "routing" do +RSpec.describe "Groups", "routing" do let(:group_path) { 'complex.group-namegit' } let!(:group) { create(:group, path: group_path) } diff --git a/spec/routing/import_routing_spec.rb b/spec/routing/import_routing_spec.rb index 7e78a1c0cd2..0ec418d33d1 100644 --- a/spec/routing/import_routing_spec.rb +++ b/spec/routing/import_routing_spec.rb @@ -23,7 +23,7 @@ require 'spec_helper' # let(:actions) { [:index] } # let(:controller) { 'issues' } # end -shared_examples 'importer routing' do +RSpec.shared_examples 'importer routing' do let(:except_actions) { [] } let(:is_realtime) { false } @@ -62,7 +62,7 @@ end # realtime_changes_import_github GET /import/github/realtime_changes(.:format) import/github#jobs # import_github POST /import/github(.:format) import/github#create # new_import_github GET /import/github/new(.:format) import/github#new -describe Import::GithubController, 'routing' do +RSpec.describe Import::GithubController, 'routing' do it_behaves_like 'importer routing' do let(:provider) { 'github' } let(:is_realtime) { true } @@ -78,7 +78,7 @@ end # realtime_changes_import_gitea GET /import/gitea/realtime_changes(.:format) import/gitea#jobs # import_gitea POST /import/gitea(.:format) import/gitea#create # new_import_gitea GET /import/gitea/new(.:format) import/gitea#new -describe Import::GiteaController, 'routing' do +RSpec.describe Import::GiteaController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:callback] } let(:provider) { 'gitea' } @@ -94,7 +94,7 @@ end # callback_import_gitlab GET /import/gitlab/callback(.:format) import/gitlab#callback # jobs_import_gitlab GET /import/gitlab/jobs(.:format) import/gitlab#jobs # import_gitlab POST /import/gitlab(.:format) import/gitlab#create -describe Import::GitlabController, 'routing' do +RSpec.describe Import::GitlabController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:new] } let(:provider) { 'gitlab' } @@ -105,7 +105,7 @@ end # callback_import_bitbucket GET /import/bitbucket/callback(.:format) import/bitbucket#callback # jobs_import_bitbucket GET /import/bitbucket/jobs(.:format) import/bitbucket#jobs # import_bitbucket POST /import/bitbucket(.:format) import/bitbucket#create -describe Import::BitbucketController, 'routing' do +RSpec.describe Import::BitbucketController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:new] } let(:provider) { 'bitbucket' } @@ -119,7 +119,7 @@ end # create_user_map_import_google_code POST /import/google_code/user_map(.:format) import/google_code#create_user_map # import_google_code POST /import/google_code(.:format) import/google_code#create # new_import_google_code GET /import/google_code/new(.:format) import/google_code#new -describe Import::GoogleCodeController, 'routing' do +RSpec.describe Import::GoogleCodeController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:callback] } let(:provider) { 'google_code' } @@ -145,7 +145,7 @@ end # create_user_map_import_fogbugz POST /import/fogbugz/user_map(.:format) import/fogbugz#create_user_map # import_fogbugz POST /import/fogbugz(.:format) import/fogbugz#create # new_import_fogbugz GET /import/fogbugz/new(.:format) import/fogbugz#new -describe Import::FogbugzController, 'routing' do +RSpec.describe Import::FogbugzController, 'routing' do it_behaves_like 'importer routing' do let(:except_actions) { [:callback] } let(:provider) { 'fogbugz' } @@ -167,7 +167,7 @@ end # import_gitlab_project POST /import/gitlab_project(.:format) import/gitlab_projects#create # POST /import/gitlab_project(.:format) import/gitlab_projects#create # new_import_gitlab_project GET /import/gitlab_project/new(.:format) import/gitlab_projects#new -describe Import::GitlabProjectsController, 'routing' do +RSpec.describe Import::GitlabProjectsController, 'routing' do it 'to #create' do expect(post('/import/gitlab_project')).to route_to('import/gitlab_projects#create') end @@ -179,7 +179,7 @@ end # new_import_phabricator GET /import/phabricator/new(.:format) import/phabricator#new # import_phabricator POST /import/phabricator(.:format) import/phabricator#create -describe Import::PhabricatorController, 'routing' do +RSpec.describe Import::PhabricatorController, 'routing' do it 'to #create' do expect(post("/import/phabricator")).to route_to("import/phabricator#create") end diff --git a/spec/routing/instance_statistics_routing_spec.rb b/spec/routing/instance_statistics_routing_spec.rb index 48a3ac4695c..7793c5cce71 100644 --- a/spec/routing/instance_statistics_routing_spec.rb +++ b/spec/routing/instance_statistics_routing_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Instance Statistics', 'routing' do +RSpec.describe 'Instance Statistics', 'routing' do include RSpec::Rails::RequestExampleGroup it "routes '/-/instance_statistics' to dev ops score" do diff --git a/spec/routing/notifications_routing_spec.rb b/spec/routing/notifications_routing_spec.rb index 8c2b29aabcb..f545badcdfa 100644 --- a/spec/routing/notifications_routing_spec.rb +++ b/spec/routing/notifications_routing_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "notifications routing" do +RSpec.describe "notifications routing" do it "routes to #show" do expect(get("/profile/notifications")).to route_to("profiles/notifications#show") end diff --git a/spec/routing/openid_connect_spec.rb b/spec/routing/openid_connect_spec.rb index fc170f8986c..b5291953730 100644 --- a/spec/routing/openid_connect_spec.rb +++ b/spec/routing/openid_connect_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' # jwks GET /-/jwks(.:format) doorkeeper/openid_connect/discovery#keys # oauth_discovery_provider GET /.well-known/openid-configuration(.:format) doorkeeper/openid_connect/discovery#provider # oauth_discovery_webfinger GET /.well-known/webfinger(.:format) doorkeeper/openid_connect/discovery#webfinger -describe Doorkeeper::OpenidConnect::DiscoveryController, 'routing' do +RSpec.describe Doorkeeper::OpenidConnect::DiscoveryController, 'routing' do it "to #provider" do expect(get('/.well-known/openid-configuration')).to route_to('doorkeeper/openid_connect/discovery#provider') end @@ -26,7 +26,7 @@ end # oauth_userinfo GET /oauth/userinfo(.:format) doorkeeper/openid_connect/userinfo#show # POST /oauth/userinfo(.:format) doorkeeper/openid_connect/userinfo#show -describe Doorkeeper::OpenidConnect::UserinfoController, 'routing' do +RSpec.describe Doorkeeper::OpenidConnect::UserinfoController, 'routing' do it "to #show" do expect(get('/oauth/userinfo')).to route_to('doorkeeper/openid_connect/userinfo#show') end diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index 0a57c76ee75..07c1c33ecb5 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'project routing' do +RSpec.describe 'project routing' do before do allow(Project).to receive(:find_by_full_path).and_return(false) allow(Project).to receive(:find_by_full_path).with('gitlab/gitlabhq', any_args).and_return(true) diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 52e60db1aab..02e930c1cbf 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -9,7 +9,7 @@ require 'spec_helper' # user_snippets GET /users/:username/snippets(.:format) # user_calendar GET /users/:username/calendar(.:format) # user_calendar_activities GET /users/:username/calendar_activities(.:format) -describe UsersController, "routing" do +RSpec.describe UsersController, "routing" do it "to #show" do allow_any_instance_of(::Constraints::UserUrlConstrainer).to receive(:matches?).and_return(true) @@ -42,7 +42,7 @@ describe UsersController, "routing" do end # search GET /search(.:format) search#show -describe SearchController, "routing" do +RSpec.describe SearchController, "routing" do it "to #show" do expect(get("/search")).to route_to('search#show') end @@ -50,7 +50,7 @@ end # gitlab_api /api API::API # /:path Grack -describe "Mounted Apps", "routing" do +RSpec.describe "Mounted Apps", "routing" do it "to API" do expect(get("/api/issues")).to be_routable end @@ -67,7 +67,7 @@ end # snippet GET /snippets/:id(.:format) snippets#show # PUT /snippets/:id(.:format) snippets#update # DELETE /snippets/:id(.:format) snippets#destroy -describe SnippetsController, "routing" do +RSpec.describe SnippetsController, "routing" do it "to #raw" do expect(get("/snippets/1/raw")).to route_to('snippets#raw', id: '1') end @@ -109,7 +109,7 @@ end # help_page GET /help/*path(.:format) help#show # help_shortcuts GET /help/shortcuts(.:format) help#shortcuts # help_ui GET /help/ui(.:format) help#ui -describe HelpController, "routing" do +RSpec.describe HelpController, "routing" do it "to #index" do expect(get("/help")).to route_to('help#index') end @@ -136,7 +136,7 @@ end # profile_token GET /profile/token(.:format) profile#token # profile GET /profile(.:format) profile#show # profile_update PUT /profile/update(.:format) profile#update -describe ProfilesController, "routing" do +RSpec.describe ProfilesController, "routing" do it "to #account" do expect(get("/profile/account")).to route_to('profiles/accounts#show') end @@ -157,7 +157,7 @@ end # profile_preferences GET /profile/preferences(.:format) profiles/preferences#show # PATCH /profile/preferences(.:format) profiles/preferences#update # PUT /profile/preferences(.:format) profiles/preferences#update -describe Profiles::PreferencesController, 'routing' do +RSpec.describe Profiles::PreferencesController, 'routing' do it 'to #show' do expect(get('/profile/preferences')).to route_to('profiles/preferences#show') end @@ -174,7 +174,7 @@ end # key GET /keys/:id(.:format) keys#show # PUT /keys/:id(.:format) keys#update # DELETE /keys/:id(.:format) keys#destroy -describe Profiles::KeysController, "routing" do +RSpec.describe Profiles::KeysController, "routing" do it "to #index" do expect(get("/profile/keys")).to route_to('profiles/keys#index') end @@ -202,7 +202,7 @@ end # emails GET /emails(.:format) emails#index # POST /keys(.:format) emails#create # DELETE /keys/:id(.:format) keys#destroy -describe Profiles::EmailsController, "routing" do +RSpec.describe Profiles::EmailsController, "routing" do it "to #index" do expect(get("/profile/emails")).to route_to('profiles/emails#index') end @@ -217,7 +217,7 @@ describe Profiles::EmailsController, "routing" do end # profile_avatar DELETE /profile/avatar(.:format) profiles/avatars#destroy -describe Profiles::AvatarsController, "routing" do +RSpec.describe Profiles::AvatarsController, "routing" do it "to #destroy" do expect(delete("/profile/avatar")).to route_to('profiles/avatars#destroy') end @@ -226,7 +226,7 @@ end # dashboard GET /dashboard(.:format) dashboard#show # dashboard_issues GET /dashboard/issues(.:format) dashboard#issues # dashboard_merge_requests GET /dashboard/merge_requests(.:format) dashboard#merge_requests -describe DashboardController, "routing" do +RSpec.describe DashboardController, "routing" do it "to #index" do expect(get("/dashboard")).to route_to('dashboard/projects#index') end @@ -245,13 +245,13 @@ describe DashboardController, "routing" do end # root / root#show -describe RootController, 'routing' do +RSpec.describe RootController, 'routing' do it 'to #index' do expect(get('/')).to route_to('root#index') end end -describe "Authentication", "routing" do +RSpec.describe "Authentication", "routing" do it "GET /users/sign_in" do expect(get("/users/sign_in")).to route_to('sessions#new') end @@ -308,7 +308,7 @@ describe "Authentication", "routing" do end end -describe HealthCheckController, 'routing' do +RSpec.describe HealthCheckController, 'routing' do it 'to #index' do expect(get('/health_check')).to route_to('health_check#index') end @@ -318,7 +318,7 @@ describe HealthCheckController, 'routing' do end end -describe InvitesController, 'routing' do +RSpec.describe InvitesController, 'routing' do let_it_be(:member) { create(:project_member, :invited) } it 'to #show' do @@ -330,7 +330,7 @@ describe InvitesController, 'routing' do end end -describe AbuseReportsController, 'routing' do +RSpec.describe AbuseReportsController, 'routing' do let_it_be(:user) { create(:user) } it 'to #new' do @@ -342,14 +342,14 @@ describe AbuseReportsController, 'routing' do end end -describe SentNotificationsController, 'routing' do +RSpec.describe SentNotificationsController, 'routing' do it 'to #unsubscribe' do expect(get("/-/sent_notifications/4bee17d4a63ed60cf5db53417e9aeb4c/unsubscribe")) .to route_to('sent_notifications#unsubscribe', id: '4bee17d4a63ed60cf5db53417e9aeb4c') end end -describe AutocompleteController, 'routing' do +RSpec.describe AutocompleteController, 'routing' do it 'to #users' do expect(get("/-/autocomplete/users")).to route_to('autocomplete#users') end diff --git a/spec/routing/uploads_routing_spec.rb b/spec/routing/uploads_routing_spec.rb index f94ae81eeb5..d1ddf8a6d6a 100644 --- a/spec/routing/uploads_routing_spec.rb +++ b/spec/routing/uploads_routing_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Uploads', 'routing' do +RSpec.describe 'Uploads', 'routing' do it 'allows creating uploads for personal snippets' do expect(post('/uploads/personal_snippet?id=1')).to route_to( controller: 'uploads', diff --git a/spec/rubocop/code_reuse_helpers_spec.rb b/spec/rubocop/code_reuse_helpers_spec.rb index 2720141aad2..44260a1f43f 100644 --- a/spec/rubocop/code_reuse_helpers_spec.rb +++ b/spec/rubocop/code_reuse_helpers_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'parser/current' require_relative '../../rubocop/code_reuse_helpers' -describe RuboCop::CodeReuseHelpers do +RSpec.describe RuboCop::CodeReuseHelpers do def parse_source(source, path = 'foo.rb') buffer = Parser::Source::Buffer.new(path) buffer.source = source diff --git a/spec/rubocop/cop/active_record_association_reload_spec.rb b/spec/rubocop/cop/active_record_association_reload_spec.rb index 82caad51359..79053a79c5a 100644 --- a/spec/rubocop/cop/active_record_association_reload_spec.rb +++ b/spec/rubocop/cop/active_record_association_reload_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../rubocop/cop/active_record_association_reload' -describe RuboCop::Cop::ActiveRecordAssociationReload, type: :rubocop do +RSpec.describe RuboCop::Cop::ActiveRecordAssociationReload, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb b/spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb index feb85c354ef..bc9db9cafec 100644 --- a/spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb +++ b/spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/avoid_break_from_strong_memoize' -describe RuboCop::Cop::AvoidBreakFromStrongMemoize do +RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers_spec.rb b/spec/rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers_spec.rb index 0271c85d6a1..851493e004e 100644 --- a/spec/rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers_spec.rb +++ b/spec/rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers' -describe RuboCop::Cop::AvoidKeywordArgumentsInSidekiqWorkers, type: :rubocop do +RSpec.describe RuboCop::Cop::AvoidKeywordArgumentsInSidekiqWorkers, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/avoid_return_from_blocks_spec.rb b/spec/rubocop/cop/avoid_return_from_blocks_spec.rb index 919cd3d98f3..9e571bf96b9 100644 --- a/spec/rubocop/cop/avoid_return_from_blocks_spec.rb +++ b/spec/rubocop/cop/avoid_return_from_blocks_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/avoid_return_from_blocks' -describe RuboCop::Cop::AvoidReturnFromBlocks do +RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/avoid_route_redirect_leading_slash_spec.rb b/spec/rubocop/cop/avoid_route_redirect_leading_slash_spec.rb index 7e526666f88..78bc859beda 100644 --- a/spec/rubocop/cop/avoid_route_redirect_leading_slash_spec.rb +++ b/spec/rubocop/cop/avoid_route_redirect_leading_slash_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../rubocop/cop/avoid_route_redirect_leading_slash' -describe RuboCop::Cop::AvoidRouteRedirectLeadingSlash, type: :rubocop do +RSpec.describe RuboCop::Cop::AvoidRouteRedirectLeadingSlash, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/ban_catch_throw_spec.rb b/spec/rubocop/cop/ban_catch_throw_spec.rb index fe2557a8b09..1d0ccb6d262 100644 --- a/spec/rubocop/cop/ban_catch_throw_spec.rb +++ b/spec/rubocop/cop/ban_catch_throw_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/ban_catch_throw' -describe RuboCop::Cop::BanCatchThrow, type: :rubocop do +RSpec.describe RuboCop::Cop::BanCatchThrow, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/code_reuse/active_record_spec.rb b/spec/rubocop/cop/code_reuse/active_record_spec.rb index 0f3d886e4b8..1ec0fb39ba6 100644 --- a/spec/rubocop/cop/code_reuse/active_record_spec.rb +++ b/spec/rubocop/cop/code_reuse/active_record_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/code_reuse/active_record' -describe RuboCop::Cop::CodeReuse::ActiveRecord do +RSpec.describe RuboCop::Cop::CodeReuse::ActiveRecord do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/code_reuse/finder_spec.rb b/spec/rubocop/cop/code_reuse/finder_spec.rb index 1488a019f6c..1935d825b19 100644 --- a/spec/rubocop/cop/code_reuse/finder_spec.rb +++ b/spec/rubocop/cop/code_reuse/finder_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/code_reuse/finder' -describe RuboCop::Cop::CodeReuse::Finder, type: :rubocop do +RSpec.describe RuboCop::Cop::CodeReuse::Finder, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/code_reuse/presenter_spec.rb b/spec/rubocop/cop/code_reuse/presenter_spec.rb index e00095ef40f..1366018ec12 100644 --- a/spec/rubocop/cop/code_reuse/presenter_spec.rb +++ b/spec/rubocop/cop/code_reuse/presenter_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/code_reuse/presenter' -describe RuboCop::Cop::CodeReuse::Presenter, type: :rubocop do +RSpec.describe RuboCop::Cop::CodeReuse::Presenter, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/code_reuse/serializer_spec.rb b/spec/rubocop/cop/code_reuse/serializer_spec.rb index df41edcf8c8..d4341cc0367 100644 --- a/spec/rubocop/cop/code_reuse/serializer_spec.rb +++ b/spec/rubocop/cop/code_reuse/serializer_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/code_reuse/serializer' -describe RuboCop::Cop::CodeReuse::Serializer, type: :rubocop do +RSpec.describe RuboCop::Cop::CodeReuse::Serializer, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/code_reuse/service_class_spec.rb b/spec/rubocop/cop/code_reuse/service_class_spec.rb index 175c8e36e64..b018e743230 100644 --- a/spec/rubocop/cop/code_reuse/service_class_spec.rb +++ b/spec/rubocop/cop/code_reuse/service_class_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/code_reuse/service_class' -describe RuboCop::Cop::CodeReuse::ServiceClass, type: :rubocop do +RSpec.describe RuboCop::Cop::CodeReuse::ServiceClass, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/code_reuse/worker_spec.rb b/spec/rubocop/cop/code_reuse/worker_spec.rb index ee4cbb3a764..bd1246ceb07 100644 --- a/spec/rubocop/cop/code_reuse/worker_spec.rb +++ b/spec/rubocop/cop/code_reuse/worker_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/code_reuse/worker' -describe RuboCop::Cop::CodeReuse::Worker, type: :rubocop do +RSpec.describe RuboCop::Cop::CodeReuse::Worker, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/destroy_all_spec.rb b/spec/rubocop/cop/destroy_all_spec.rb index b6a3b291e3d..3220d44ea2b 100644 --- a/spec/rubocop/cop/destroy_all_spec.rb +++ b/spec/rubocop/cop/destroy_all_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/destroy_all' -describe RuboCop::Cop::DestroyAll, type: :rubocop do +RSpec.describe RuboCop::Cop::DestroyAll, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/filename_length_spec.rb b/spec/rubocop/cop/filename_length_spec.rb index b1cc845787a..381218c61ed 100644 --- a/spec/rubocop/cop/filename_length_spec.rb +++ b/spec/rubocop/cop/filename_length_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/filename_length' -describe RuboCop::Cop::FilenameLength, type: :rubocop do +RSpec.describe RuboCop::Cop::FilenameLength, type: :rubocop do subject(:cop) { described_class.new } it 'does not flag files with names 100 characters long' do diff --git a/spec/rubocop/cop/gitlab/change_timezone_spec.rb b/spec/rubocop/cop/gitlab/change_timezone_spec.rb index cc311754cac..1ec5f28e811 100644 --- a/spec/rubocop/cop/gitlab/change_timezone_spec.rb +++ b/spec/rubocop/cop/gitlab/change_timezone_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/change_timzone' -describe RuboCop::Cop::Gitlab::ChangeTimezone, type: :rubocop do +RSpec.describe RuboCop::Cop::Gitlab::ChangeTimezone, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/gitlab/const_get_inherit_false_spec.rb b/spec/rubocop/cop/gitlab/const_get_inherit_false_spec.rb index ebebe8792d9..97ed6b743f9 100644 --- a/spec/rubocop/cop/gitlab/const_get_inherit_false_spec.rb +++ b/spec/rubocop/cop/gitlab/const_get_inherit_false_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/const_get_inherit_false' -describe RuboCop::Cop::Gitlab::ConstGetInheritFalse, type: :rubocop do +RSpec.describe RuboCop::Cop::Gitlab::ConstGetInheritFalse, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/gitlab/duplicate_spec_location_spec.rb b/spec/rubocop/cop/gitlab/duplicate_spec_location_spec.rb index fb18045b390..1ed21e44290 100644 --- a/spec/rubocop/cop/gitlab/duplicate_spec_location_spec.rb +++ b/spec/rubocop/cop/gitlab/duplicate_spec_location_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require_relative '../../../../rubocop/cop/gitlab/duplicate_spec_location' -describe RuboCop::Cop::Gitlab::DuplicateSpecLocation, type: :rubocop do +RSpec.describe RuboCop::Cop::Gitlab::DuplicateSpecLocation, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/gitlab/finder_with_find_by_spec.rb b/spec/rubocop/cop/gitlab/finder_with_find_by_spec.rb index acc05b434b2..30ee422f420 100644 --- a/spec/rubocop/cop/gitlab/finder_with_find_by_spec.rb +++ b/spec/rubocop/cop/gitlab/finder_with_find_by_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/finder_with_find_by' -describe RuboCop::Cop::Gitlab::FinderWithFindBy, type: :rubocop do +RSpec.describe RuboCop::Cop::Gitlab::FinderWithFindBy, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/gitlab/httparty_spec.rb b/spec/rubocop/cop/gitlab/httparty_spec.rb index 1585e00730a..379365096ba 100644 --- a/spec/rubocop/cop/gitlab/httparty_spec.rb +++ b/spec/rubocop/cop/gitlab/httparty_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/httparty' -describe RuboCop::Cop::Gitlab::HTTParty, type: :rubocop do # rubocop:disable RSpec/FilePath +RSpec.describe RuboCop::Cop::Gitlab::HTTParty, type: :rubocop do # rubocop:disable RSpec/FilePath include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/gitlab/json_spec.rb b/spec/rubocop/cop/gitlab/json_spec.rb index fbff8c85ca1..6f5ec07ffb1 100644 --- a/spec/rubocop/cop/gitlab/json_spec.rb +++ b/spec/rubocop/cop/gitlab/json_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/json' -describe RuboCop::Cop::Gitlab::Json, type: :rubocop do +RSpec.describe RuboCop::Cop::Gitlab::Json, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/gitlab/module_with_instance_variables_spec.rb b/spec/rubocop/cop/gitlab/module_with_instance_variables_spec.rb index 1729e196b40..3d22201c92e 100644 --- a/spec/rubocop/cop/gitlab/module_with_instance_variables_spec.rb +++ b/spec/rubocop/cop/gitlab/module_with_instance_variables_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/module_with_instance_variables' -describe RuboCop::Cop::Gitlab::ModuleWithInstanceVariables, type: :rubocop do +RSpec.describe RuboCop::Cop::Gitlab::ModuleWithInstanceVariables, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/gitlab/predicate_memoization_spec.rb b/spec/rubocop/cop/gitlab/predicate_memoization_spec.rb index 3f04b0d636f..ebe984b189d 100644 --- a/spec/rubocop/cop/gitlab/predicate_memoization_spec.rb +++ b/spec/rubocop/cop/gitlab/predicate_memoization_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/predicate_memoization' -describe RuboCop::Cop::Gitlab::PredicateMemoization, type: :rubocop do +RSpec.describe RuboCop::Cop::Gitlab::PredicateMemoization, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/gitlab/rails_logger_spec.rb b/spec/rubocop/cop/gitlab/rails_logger_spec.rb index ed8d20891de..0583079136b 100644 --- a/spec/rubocop/cop/gitlab/rails_logger_spec.rb +++ b/spec/rubocop/cop/gitlab/rails_logger_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/rails_logger' -describe RuboCop::Cop::Gitlab::RailsLogger, type: :rubocop do +RSpec.describe RuboCop::Cop::Gitlab::RailsLogger, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/gitlab/union_spec.rb b/spec/rubocop/cop/gitlab/union_spec.rb index 593d2bde96d..571dcc4eeb4 100644 --- a/spec/rubocop/cop/gitlab/union_spec.rb +++ b/spec/rubocop/cop/gitlab/union_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/union' -describe RuboCop::Cop::Gitlab::Union, type: :rubocop do +RSpec.describe RuboCop::Cop::Gitlab::Union, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/graphql/authorize_types_spec.rb b/spec/rubocop/cop/graphql/authorize_types_spec.rb index ed3b9867a56..5d35690c8b7 100644 --- a/spec/rubocop/cop/graphql/authorize_types_spec.rb +++ b/spec/rubocop/cop/graphql/authorize_types_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require_relative '../../../../rubocop/cop/graphql/authorize_types' -describe RuboCop::Cop::Graphql::AuthorizeTypes, type: :rubocop do +RSpec.describe RuboCop::Cop::Graphql::AuthorizeTypes, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/graphql/descriptions_spec.rb b/spec/rubocop/cop/graphql/descriptions_spec.rb index 245b0c17fb8..3b29cd2fbee 100644 --- a/spec/rubocop/cop/graphql/descriptions_spec.rb +++ b/spec/rubocop/cop/graphql/descriptions_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/graphql/descriptions' -describe RuboCop::Cop::Graphql::Descriptions, type: :rubocop do +RSpec.describe RuboCop::Cop::Graphql::Descriptions, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/group_public_or_visible_to_user_spec.rb b/spec/rubocop/cop/group_public_or_visible_to_user_spec.rb index 98d12b119fc..4e725deaafd 100644 --- a/spec/rubocop/cop/group_public_or_visible_to_user_spec.rb +++ b/spec/rubocop/cop/group_public_or_visible_to_user_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/group_public_or_visible_to_user' -describe RuboCop::Cop::GroupPublicOrVisibleToUser, type: :rubocop do +RSpec.describe RuboCop::Cop::GroupPublicOrVisibleToUser, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/ignored_columns_spec.rb b/spec/rubocop/cop/ignored_columns_spec.rb index 9e51017a393..ec5499bbdff 100644 --- a/spec/rubocop/cop/ignored_columns_spec.rb +++ b/spec/rubocop/cop/ignored_columns_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/ignored_columns' -describe RuboCop::Cop::IgnoredColumns, type: :rubocop do +RSpec.describe RuboCop::Cop::IgnoredColumns, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/include_sidekiq_worker_spec.rb b/spec/rubocop/cop/include_sidekiq_worker_spec.rb index ca05e829b4c..8d056c6a13e 100644 --- a/spec/rubocop/cop/include_sidekiq_worker_spec.rb +++ b/spec/rubocop/cop/include_sidekiq_worker_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/include_sidekiq_worker' -describe RuboCop::Cop::IncludeSidekiqWorker, type: :rubocop do +RSpec.describe RuboCop::Cop::IncludeSidekiqWorker, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/inject_enterprise_edition_module_spec.rb b/spec/rubocop/cop/inject_enterprise_edition_module_spec.rb index a37c2daa4a6..767ed994542 100644 --- a/spec/rubocop/cop/inject_enterprise_edition_module_spec.rb +++ b/spec/rubocop/cop/inject_enterprise_edition_module_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/inject_enterprise_edition_module' -describe RuboCop::Cop::InjectEnterpriseEditionModule, type: :rubocop do +RSpec.describe RuboCop::Cop::InjectEnterpriseEditionModule, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/line_break_around_conditional_block_spec.rb b/spec/rubocop/cop/line_break_around_conditional_block_spec.rb index 3586f3c4708..0a26ef49e35 100644 --- a/spec/rubocop/cop/line_break_around_conditional_block_spec.rb +++ b/spec/rubocop/cop/line_break_around_conditional_block_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/line_break_around_conditional_block' -describe RuboCop::Cop::LineBreakAroundConditionalBlock, type: :rubocop do +RSpec.describe RuboCop::Cop::LineBreakAroundConditionalBlock, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_column_with_default_spec.rb b/spec/rubocop/cop/migration/add_column_with_default_spec.rb index 3427dd57ceb..50af344e0d4 100644 --- a/spec/rubocop/cop/migration/add_column_with_default_spec.rb +++ b/spec/rubocop/cop/migration/add_column_with_default_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/add_column_with_default' -describe RuboCop::Cop::Migration::AddColumnWithDefault, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::AddColumnWithDefault, type: :rubocop do include CopHelper let(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_columns_to_wide_tables_spec.rb b/spec/rubocop/cop/migration/add_columns_to_wide_tables_spec.rb index b626e79cb9d..6ae4fb21126 100644 --- a/spec/rubocop/cop/migration/add_columns_to_wide_tables_spec.rb +++ b/spec/rubocop/cop/migration/add_columns_to_wide_tables_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/add_columns_to_wide_tables' -describe RuboCop::Cop::Migration::AddColumnsToWideTables, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::AddColumnsToWideTables, type: :rubocop do include CopHelper let(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb b/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb index efb4869ee93..b43d44dba65 100644 --- a/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb +++ b/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/add_concurrent_foreign_key' -describe RuboCop::Cop::Migration::AddConcurrentForeignKey, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::AddConcurrentForeignKey, type: :rubocop do include CopHelper let(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_concurrent_index_spec.rb b/spec/rubocop/cop/migration/add_concurrent_index_spec.rb index b08070d679e..cef5295830c 100644 --- a/spec/rubocop/cop/migration/add_concurrent_index_spec.rb +++ b/spec/rubocop/cop/migration/add_concurrent_index_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/add_concurrent_index' -describe RuboCop::Cop::Migration::AddConcurrentIndex, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::AddConcurrentIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_index_spec.rb b/spec/rubocop/cop/migration/add_index_spec.rb index 6be2a019fc2..6bb78a7f3c7 100644 --- a/spec/rubocop/cop/migration/add_index_spec.rb +++ b/spec/rubocop/cop/migration/add_index_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/add_index' -describe RuboCop::Cop::Migration::AddIndex, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::AddIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb b/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb index 888f9aa6259..5f0ca419548 100644 --- a/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb +++ b/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/add_limit_to_text_columns' -describe RuboCop::Cop::Migration::AddLimitToTextColumns, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::AddLimitToTextColumns, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_reference_spec.rb b/spec/rubocop/cop/migration/add_reference_spec.rb index 1bc67820396..fab70d74b55 100644 --- a/spec/rubocop/cop/migration/add_reference_spec.rb +++ b/spec/rubocop/cop/migration/add_reference_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/add_reference' -describe RuboCop::Cop::Migration::AddReference, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::AddReference, type: :rubocop do include CopHelper let(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_timestamps_spec.rb b/spec/rubocop/cop/migration/add_timestamps_spec.rb index da4b7d91a57..c18b6b06ded 100644 --- a/spec/rubocop/cop/migration/add_timestamps_spec.rb +++ b/spec/rubocop/cop/migration/add_timestamps_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/add_timestamps' -describe RuboCop::Cop::Migration::AddTimestamps, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::AddTimestamps, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/datetime_spec.rb b/spec/rubocop/cop/migration/datetime_spec.rb index 98ce8ec0666..c5f6fd503ec 100644 --- a/spec/rubocop/cop/migration/datetime_spec.rb +++ b/spec/rubocop/cop/migration/datetime_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/datetime' -describe RuboCop::Cop::Migration::Datetime, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::Datetime, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/hash_index_spec.rb b/spec/rubocop/cop/migration/hash_index_spec.rb index 917556a446b..3d26ea41d08 100644 --- a/spec/rubocop/cop/migration/hash_index_spec.rb +++ b/spec/rubocop/cop/migration/hash_index_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/hash_index' -describe RuboCop::Cop::Migration::HashIndex, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::HashIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/prevent_strings_spec.rb b/spec/rubocop/cop/migration/prevent_strings_spec.rb index bcb845cde9d..6882dca1926 100644 --- a/spec/rubocop/cop/migration/prevent_strings_spec.rb +++ b/spec/rubocop/cop/migration/prevent_strings_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/prevent_strings' -describe RuboCop::Cop::Migration::PreventStrings, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::PreventStrings, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/remove_column_spec.rb b/spec/rubocop/cop/migration/remove_column_spec.rb index ea9ce89431f..7ef5556d8d7 100644 --- a/spec/rubocop/cop/migration/remove_column_spec.rb +++ b/spec/rubocop/cop/migration/remove_column_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/remove_column' -describe RuboCop::Cop::Migration::RemoveColumn, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::RemoveColumn, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/remove_concurrent_index_spec.rb b/spec/rubocop/cop/migration/remove_concurrent_index_spec.rb index 5a71d72be46..f70febb571d 100644 --- a/spec/rubocop/cop/migration/remove_concurrent_index_spec.rb +++ b/spec/rubocop/cop/migration/remove_concurrent_index_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/remove_concurrent_index' -describe RuboCop::Cop::Migration::RemoveConcurrentIndex, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::RemoveConcurrentIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/remove_index_spec.rb b/spec/rubocop/cop/migration/remove_index_spec.rb index 852ff563665..cc82306a0f5 100644 --- a/spec/rubocop/cop/migration/remove_index_spec.rb +++ b/spec/rubocop/cop/migration/remove_index_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/remove_index' -describe RuboCop::Cop::Migration::RemoveIndex, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::RemoveIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/safer_boolean_column_spec.rb b/spec/rubocop/cop/migration/safer_boolean_column_spec.rb index 8c78bbba490..013f2edc5e9 100644 --- a/spec/rubocop/cop/migration/safer_boolean_column_spec.rb +++ b/spec/rubocop/cop/migration/safer_boolean_column_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/safer_boolean_column' -describe RuboCop::Cop::Migration::SaferBooleanColumn, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::SaferBooleanColumn, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/schedule_async_spec.rb b/spec/rubocop/cop/migration/schedule_async_spec.rb index 3453f1c51cc..a7246dfa73a 100644 --- a/spec/rubocop/cop/migration/schedule_async_spec.rb +++ b/spec/rubocop/cop/migration/schedule_async_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/migration/schedule_async' -describe RuboCop::Cop::Migration::ScheduleAsync do +RSpec.describe RuboCop::Cop::Migration::ScheduleAsync do include CopHelper let(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/timestamps_spec.rb b/spec/rubocop/cop/migration/timestamps_spec.rb index 866e922686f..14b3cb36cf8 100644 --- a/spec/rubocop/cop/migration/timestamps_spec.rb +++ b/spec/rubocop/cop/migration/timestamps_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/timestamps' -describe RuboCop::Cop::Migration::Timestamps, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::Timestamps, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/update_column_in_batches_spec.rb b/spec/rubocop/cop/migration/update_column_in_batches_spec.rb index f72efaf2eb2..5d96e8048bf 100644 --- a/spec/rubocop/cop/migration/update_column_in_batches_spec.rb +++ b/spec/rubocop/cop/migration/update_column_in_batches_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/migration/update_column_in_batches' -describe RuboCop::Cop::Migration::UpdateColumnInBatches do +RSpec.describe RuboCop::Cop::Migration::UpdateColumnInBatches do let(:cop) { described_class.new } let(:tmp_rails_root) { Rails.root.join('tmp', 'rails_root') } let(:migration_code) do diff --git a/spec/rubocop/cop/migration/with_lock_retries_disallowed_method_spec.rb b/spec/rubocop/cop/migration/with_lock_retries_disallowed_method_spec.rb index acb583475be..11e4d784617 100644 --- a/spec/rubocop/cop/migration/with_lock_retries_disallowed_method_spec.rb +++ b/spec/rubocop/cop/migration/with_lock_retries_disallowed_method_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/with_lock_retries_disallowed_method' -describe RuboCop::Cop::Migration::WithLockRetriesDisallowedMethod, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::WithLockRetriesDisallowedMethod, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/with_lock_retries_with_change_spec.rb b/spec/rubocop/cop/migration/with_lock_retries_with_change_spec.rb index 38fe1f510c4..93b96f3a20e 100644 --- a/spec/rubocop/cop/migration/with_lock_retries_with_change_spec.rb +++ b/spec/rubocop/cop/migration/with_lock_retries_with_change_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/migration/with_lock_retries_with_change' -describe RuboCop::Cop::Migration::WithLockRetriesWithChange, type: :rubocop do +RSpec.describe RuboCop::Cop::Migration::WithLockRetriesWithChange, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/performance/ar_count_each_spec.rb b/spec/rubocop/cop/performance/ar_count_each_spec.rb index 2bcc6f4cfd6..33b667dd52f 100644 --- a/spec/rubocop/cop/performance/ar_count_each_spec.rb +++ b/spec/rubocop/cop/performance/ar_count_each_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/performance/ar_count_each.rb' -describe RuboCop::Cop::Performance::ARCountEach, type: :rubocop do +RSpec.describe RuboCop::Cop::Performance::ARCountEach, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb b/spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb index b0c260df733..972f3c52153 100644 --- a/spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb +++ b/spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/performance/ar_exists_and_present_blank.rb' -describe RuboCop::Cop::Performance::ARExistsAndPresentBlank, type: :rubocop do +RSpec.describe RuboCop::Cop::Performance::ARExistsAndPresentBlank, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/performance/readlines_each_spec.rb b/spec/rubocop/cop/performance/readlines_each_spec.rb index aee098b80eb..2f222f1dc00 100644 --- a/spec/rubocop/cop/performance/readlines_each_spec.rb +++ b/spec/rubocop/cop/performance/readlines_each_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/performance/readlines_each' -describe RuboCop::Cop::Performance::ReadlinesEach, type: :rubocop do +RSpec.describe RuboCop::Cop::Performance::ReadlinesEach, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/prefer_class_methods_over_module_spec.rb b/spec/rubocop/cop/prefer_class_methods_over_module_spec.rb index d71d95ca662..bed8d331209 100644 --- a/spec/rubocop/cop/prefer_class_methods_over_module_spec.rb +++ b/spec/rubocop/cop/prefer_class_methods_over_module_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/prefer_class_methods_over_module' -describe RuboCop::Cop::PreferClassMethodsOverModule, type: :rubocop do +RSpec.describe RuboCop::Cop::PreferClassMethodsOverModule, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/project_path_helper_spec.rb b/spec/rubocop/cop/project_path_helper_spec.rb index eab43521873..0e5b0b10ae6 100644 --- a/spec/rubocop/cop/project_path_helper_spec.rb +++ b/spec/rubocop/cop/project_path_helper_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/project_path_helper' -describe RuboCop::Cop::ProjectPathHelper, type: :rubocop do +RSpec.describe RuboCop::Cop::ProjectPathHelper, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/put_group_routes_under_scope_spec.rb b/spec/rubocop/cop/put_group_routes_under_scope_spec.rb index f6213e53165..2e577c9c578 100644 --- a/spec/rubocop/cop/put_group_routes_under_scope_spec.rb +++ b/spec/rubocop/cop/put_group_routes_under_scope_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../rubocop/cop/put_group_routes_under_scope' -describe RuboCop::Cop::PutGroupRoutesUnderScope, type: :rubocop do +RSpec.describe RuboCop::Cop::PutGroupRoutesUnderScope, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/put_project_routes_under_scope_spec.rb b/spec/rubocop/cop/put_project_routes_under_scope_spec.rb index 73f19bffec4..66e9044c453 100644 --- a/spec/rubocop/cop/put_project_routes_under_scope_spec.rb +++ b/spec/rubocop/cop/put_project_routes_under_scope_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../rubocop/cop/put_project_routes_under_scope' -describe RuboCop::Cop::PutProjectRoutesUnderScope, type: :rubocop do +RSpec.describe RuboCop::Cop::PutProjectRoutesUnderScope, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb b/spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb index e760ff66d5a..484b5fad473 100644 --- a/spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb +++ b/spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/qa/ambiguous_page_object_name' -describe RuboCop::Cop::QA::AmbiguousPageObjectName, type: :rubocop do +RSpec.describe RuboCop::Cop::QA::AmbiguousPageObjectName, type: :rubocop do include CopHelper let(:source_file) { 'qa/page.rb' } diff --git a/spec/rubocop/cop/qa/element_with_pattern_spec.rb b/spec/rubocop/cop/qa/element_with_pattern_spec.rb index 6d135cb9ea6..0e599701531 100644 --- a/spec/rubocop/cop/qa/element_with_pattern_spec.rb +++ b/spec/rubocop/cop/qa/element_with_pattern_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/qa/element_with_pattern' -describe RuboCop::Cop::QA::ElementWithPattern, type: :rubocop do +RSpec.describe RuboCop::Cop::QA::ElementWithPattern, type: :rubocop do include CopHelper let(:source_file) { 'qa/page.rb' } diff --git a/spec/rubocop/cop/rspec/any_instance_of_spec.rb b/spec/rubocop/cop/rspec/any_instance_of_spec.rb index 7a4ba935020..11c0f109850 100644 --- a/spec/rubocop/cop/rspec/any_instance_of_spec.rb +++ b/spec/rubocop/cop/rspec/any_instance_of_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require_relative '../../../../rubocop/cop/rspec/any_instance_of' -describe RuboCop::Cop::RSpec::AnyInstanceOf, type: :rubocop do +RSpec.describe RuboCop::Cop::RSpec::AnyInstanceOf, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/rspec/be_success_matcher_spec.rb b/spec/rubocop/cop/rspec/be_success_matcher_spec.rb index f69766676c5..a16cd8b634f 100644 --- a/spec/rubocop/cop/rspec/be_success_matcher_spec.rb +++ b/spec/rubocop/cop/rspec/be_success_matcher_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require_relative '../../../../rubocop/cop/rspec/be_success_matcher' -describe RuboCop::Cop::RSpec::BeSuccessMatcher, type: :rubocop do +RSpec.describe RuboCop::Cop::RSpec::BeSuccessMatcher, type: :rubocop do include CopHelper let(:source_file) { 'spec/foo_spec.rb' } diff --git a/spec/rubocop/cop/rspec/env_assignment_spec.rb b/spec/rubocop/cop/rspec/env_assignment_spec.rb index 7b8f021a622..72ad584dd6f 100644 --- a/spec/rubocop/cop/rspec/env_assignment_spec.rb +++ b/spec/rubocop/cop/rspec/env_assignment_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/rspec/env_assignment' -describe RuboCop::Cop::RSpec::EnvAssignment, type: :rubocop do +RSpec.describe RuboCop::Cop::RSpec::EnvAssignment, type: :rubocop do include CopHelper offense_call_single_quotes_key = %(ENV['FOO'] = 'bar').freeze diff --git a/spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb b/spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb index 10de8ee7865..1bb93402a5b 100644 --- a/spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb +++ b/spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/rspec/factories_in_migration_specs' -describe RuboCop::Cop::RSpec::FactoriesInMigrationSpecs, type: :rubocop do +RSpec.describe RuboCop::Cop::RSpec::FactoriesInMigrationSpecs, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb b/spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb index 4aa45e66ca7..f6040350dc0 100644 --- a/spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb +++ b/spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb @@ -8,7 +8,7 @@ require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/rspec/have_gitlab_http_status' -describe RuboCop::Cop::RSpec::HaveGitlabHttpStatus do +RSpec.describe RuboCop::Cop::RSpec::HaveGitlabHttpStatus do include CopHelper using RSpec::Parameterized::TableSyntax diff --git a/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb b/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb index 670c70889f2..ca47bba4264 100644 --- a/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb +++ b/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/rspec/modify_sidekiq_middleware' -describe RuboCop::Cop::RSpec::ModifySidekiqMiddleware, type: :rubocop do +RSpec.describe RuboCop::Cop::RSpec::ModifySidekiqMiddleware, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/rspec/top_level_describe_path_spec.rb b/spec/rubocop/cop/rspec/top_level_describe_path_spec.rb index f03b75ecc73..92a76bde243 100644 --- a/spec/rubocop/cop/rspec/top_level_describe_path_spec.rb +++ b/spec/rubocop/cop/rspec/top_level_describe_path_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/rspec/top_level_describe_path' -describe RuboCop::Cop::RSpec::TopLevelDescribePath, type: :rubocop do +RSpec.describe RuboCop::Cop::RSpec::TopLevelDescribePath, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/ruby_interpolation_in_translation_spec.rb b/spec/rubocop/cop/ruby_interpolation_in_translation_spec.rb index 481f06c8c33..938ddc7fb6a 100644 --- a/spec/rubocop/cop/ruby_interpolation_in_translation_spec.rb +++ b/spec/rubocop/cop/ruby_interpolation_in_translation_spec.rb @@ -9,7 +9,7 @@ require_relative '../../../rubocop/cop/ruby_interpolation_in_translation' # Disabling interpolation check as we deliberately want to have #{} in strings. # rubocop:disable Lint/InterpolationCheck -describe RuboCop::Cop::RubyInterpolationInTranslation, type: :rubocop do +RSpec.describe RuboCop::Cop::RubyInterpolationInTranslation, type: :rubocop do subject(:cop) { described_class.new } it 'does not add an offence for a regular messages' do diff --git a/spec/rubocop/cop/safe_params_spec.rb b/spec/rubocop/cop/safe_params_spec.rb index 1f52898851f..c4f683a41bf 100644 --- a/spec/rubocop/cop/safe_params_spec.rb +++ b/spec/rubocop/cop/safe_params_spec.rb @@ -5,7 +5,7 @@ require 'rubocop' require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/safe_params' -describe RuboCop::Cop::SafeParams, type: :rubocop do +RSpec.describe RuboCop::Cop::SafeParams, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb b/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb index 5c333aea5cf..48964ab76e0 100644 --- a/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb +++ b/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/scalability/bulk_perform_with_context' -describe RuboCop::Cop::Scalability::BulkPerformWithContext, type: :rubocop do +RSpec.describe RuboCop::Cop::Scalability::BulkPerformWithContext, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/scalability/cron_worker_context_spec.rb b/spec/rubocop/cop/scalability/cron_worker_context_spec.rb index 3add0a44ba4..4b4ee7258f1 100644 --- a/spec/rubocop/cop/scalability/cron_worker_context_spec.rb +++ b/spec/rubocop/cop/scalability/cron_worker_context_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/scalability/cron_worker_context' -describe RuboCop::Cop::Scalability::CronWorkerContext, type: :rubocop do +RSpec.describe RuboCop::Cop::Scalability::CronWorkerContext, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/scalability/file_uploads_spec.rb b/spec/rubocop/cop/scalability/file_uploads_spec.rb index d3102b2a961..ed826728681 100644 --- a/spec/rubocop/cop/scalability/file_uploads_spec.rb +++ b/spec/rubocop/cop/scalability/file_uploads_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/scalability/file_uploads' -describe RuboCop::Cop::Scalability::FileUploads, type: :rubocop do +RSpec.describe RuboCop::Cop::Scalability::FileUploads, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/scalability/idempotent_worker_spec.rb b/spec/rubocop/cop/scalability/idempotent_worker_spec.rb index 97b1886310a..9197cc954f5 100644 --- a/spec/rubocop/cop/scalability/idempotent_worker_spec.rb +++ b/spec/rubocop/cop/scalability/idempotent_worker_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/scalability/idempotent_worker' -describe RuboCop::Cop::Scalability::IdempotentWorker, type: :rubocop do +RSpec.describe RuboCop::Cop::Scalability::IdempotentWorker, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/sidekiq_options_queue_spec.rb b/spec/rubocop/cop/sidekiq_options_queue_spec.rb index 3dd247ae796..e76265d426c 100644 --- a/spec/rubocop/cop/sidekiq_options_queue_spec.rb +++ b/spec/rubocop/cop/sidekiq_options_queue_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/sidekiq_options_queue' -describe RuboCop::Cop::SidekiqOptionsQueue, type: :rubocop do +RSpec.describe RuboCop::Cop::SidekiqOptionsQueue, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/static_translation_definition_spec.rb b/spec/rubocop/cop/static_translation_definition_spec.rb index b85f9da9b4e..2bad10d5e39 100644 --- a/spec/rubocop/cop/static_translation_definition_spec.rb +++ b/spec/rubocop/cop/static_translation_definition_spec.rb @@ -7,7 +7,7 @@ require 'rubocop/rspec/support' require_relative '../../../rubocop/cop/static_translation_definition' -describe RuboCop::Cop::StaticTranslationDefinition do +RSpec.describe RuboCop::Cop::StaticTranslationDefinition do include CopHelper using RSpec::Parameterized::TableSyntax diff --git a/spec/rubocop/migration_helpers_spec.rb b/spec/rubocop/migration_helpers_spec.rb index 73ced8c58da..f0be21c9d70 100644 --- a/spec/rubocop/migration_helpers_spec.rb +++ b/spec/rubocop/migration_helpers_spec.rb @@ -6,7 +6,7 @@ require 'rspec-parameterized' require_relative '../../rubocop/migration_helpers' -describe RuboCop::MigrationHelpers do +RSpec.describe RuboCop::MigrationHelpers do using RSpec::Parameterized::TableSyntax subject(:fake_cop) { Class.new { include RuboCop::MigrationHelpers }.new } diff --git a/spec/rubocop/qa_helpers_spec.rb b/spec/rubocop/qa_helpers_spec.rb index 26e4c1ca6f0..6961869ebb7 100644 --- a/spec/rubocop/qa_helpers_spec.rb +++ b/spec/rubocop/qa_helpers_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require 'rubocop' require_relative '../../rubocop/qa_helpers' -describe RuboCop::QAHelpers do +RSpec.describe RuboCop::QAHelpers do def parse_source(source, path = 'foo.rb') buffer = Parser::Source::Buffer.new(path) buffer.source = source diff --git a/spec/serializers/accessibility_error_entity_spec.rb b/spec/serializers/accessibility_error_entity_spec.rb index e9bfabb7aa8..afbff15a195 100644 --- a/spec/serializers/accessibility_error_entity_spec.rb +++ b/spec/serializers/accessibility_error_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AccessibilityErrorEntity do +RSpec.describe AccessibilityErrorEntity do let(:entity) { described_class.new(accessibility_error) } describe '#as_json' do diff --git a/spec/serializers/accessibility_reports_comparer_entity_spec.rb b/spec/serializers/accessibility_reports_comparer_entity_spec.rb index ed2c17de640..3024974710e 100644 --- a/spec/serializers/accessibility_reports_comparer_entity_spec.rb +++ b/spec/serializers/accessibility_reports_comparer_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AccessibilityReportsComparerEntity do +RSpec.describe AccessibilityReportsComparerEntity do let(:entity) { described_class.new(comparer) } let(:comparer) { Gitlab::Ci::Reports::AccessibilityReportsComparer.new(base_report, head_report) } let(:base_report) { Gitlab::Ci::Reports::AccessibilityReports.new } diff --git a/spec/serializers/accessibility_reports_comparer_serializer_spec.rb b/spec/serializers/accessibility_reports_comparer_serializer_spec.rb index 37dc760fdec..ef56f5b6b6b 100644 --- a/spec/serializers/accessibility_reports_comparer_serializer_spec.rb +++ b/spec/serializers/accessibility_reports_comparer_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AccessibilityReportsComparerSerializer do +RSpec.describe AccessibilityReportsComparerSerializer do let(:project) { double(:project) } let(:serializer) { described_class.new(project: project).represent(comparer) } let(:comparer) { Gitlab::Ci::Reports::AccessibilityReportsComparer.new(base_report, head_report) } diff --git a/spec/serializers/analytics_build_entity_spec.rb b/spec/serializers/analytics_build_entity_spec.rb index dfa16075d20..20bd017d1cf 100644 --- a/spec/serializers/analytics_build_entity_spec.rb +++ b/spec/serializers/analytics_build_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AnalyticsBuildEntity do +RSpec.describe AnalyticsBuildEntity do let(:entity) do described_class.new(build, request: double) end diff --git a/spec/serializers/analytics_build_serializer_spec.rb b/spec/serializers/analytics_build_serializer_spec.rb index 04a387fd353..94a42ba4ffa 100644 --- a/spec/serializers/analytics_build_serializer_spec.rb +++ b/spec/serializers/analytics_build_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AnalyticsBuildSerializer do +RSpec.describe AnalyticsBuildSerializer do let(:resource) { create(:ci_build) } subject { described_class.new.represent(resource) } diff --git a/spec/serializers/analytics_issue_entity_spec.rb b/spec/serializers/analytics_issue_entity_spec.rb index 555efe136e6..2518eec8c23 100644 --- a/spec/serializers/analytics_issue_entity_spec.rb +++ b/spec/serializers/analytics_issue_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AnalyticsIssueEntity do +RSpec.describe AnalyticsIssueEntity do let(:user) { create(:user) } let(:entity_hash) do { diff --git a/spec/serializers/analytics_issue_serializer_spec.rb b/spec/serializers/analytics_issue_serializer_spec.rb index 9b29739a8f2..5d268fe514b 100644 --- a/spec/serializers/analytics_issue_serializer_spec.rb +++ b/spec/serializers/analytics_issue_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AnalyticsIssueSerializer do +RSpec.describe AnalyticsIssueSerializer do subject do described_class .new(entity: :merge_request) diff --git a/spec/serializers/analytics_merge_request_serializer_spec.rb b/spec/serializers/analytics_merge_request_serializer_spec.rb index c82eb28a28b..adf7321c738 100644 --- a/spec/serializers/analytics_merge_request_serializer_spec.rb +++ b/spec/serializers/analytics_merge_request_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AnalyticsMergeRequestSerializer do +RSpec.describe AnalyticsMergeRequestSerializer do subject do described_class .new(entity: :merge_request) diff --git a/spec/serializers/analytics_stage_serializer_spec.rb b/spec/serializers/analytics_stage_serializer_spec.rb index 1f1a0180b1f..0f2de262188 100644 --- a/spec/serializers/analytics_stage_serializer_spec.rb +++ b/spec/serializers/analytics_stage_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AnalyticsStageSerializer do +RSpec.describe AnalyticsStageSerializer do subject do described_class.new.represent(resource) end diff --git a/spec/serializers/analytics_summary_serializer_spec.rb b/spec/serializers/analytics_summary_serializer_spec.rb index ed126720a55..cd8be07827d 100644 --- a/spec/serializers/analytics_summary_serializer_spec.rb +++ b/spec/serializers/analytics_summary_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AnalyticsSummarySerializer do +RSpec.describe AnalyticsSummarySerializer do subject do described_class.new.represent(resource) end diff --git a/spec/serializers/blob_entity_spec.rb b/spec/serializers/blob_entity_spec.rb index 3cd967ed44c..b8c8c4c17de 100644 --- a/spec/serializers/blob_entity_spec.rb +++ b/spec/serializers/blob_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BlobEntity do +RSpec.describe BlobEntity do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:blob) { project.commit('master').diffs.diff_files.first.blob } diff --git a/spec/serializers/board_serializer_spec.rb b/spec/serializers/board_serializer_spec.rb index 8a633e46316..9e6d5a93d53 100644 --- a/spec/serializers/board_serializer_spec.rb +++ b/spec/serializers/board_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BoardSerializer do +RSpec.describe BoardSerializer do let(:resource) { create(:board) } let(:json_entity) do described_class.new diff --git a/spec/serializers/build_action_entity_spec.rb b/spec/serializers/build_action_entity_spec.rb index 7cd1fdcda22..75ae244db83 100644 --- a/spec/serializers/build_action_entity_spec.rb +++ b/spec/serializers/build_action_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BuildActionEntity do +RSpec.describe BuildActionEntity do let(:job) { create(:ci_build, name: 'test_job') } let(:request) { double('request') } let(:user) { create(:user) } diff --git a/spec/serializers/build_artifact_entity_spec.rb b/spec/serializers/build_artifact_entity_spec.rb index afa2aa3d254..02c172d723f 100644 --- a/spec/serializers/build_artifact_entity_spec.rb +++ b/spec/serializers/build_artifact_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BuildArtifactEntity do +RSpec.describe BuildArtifactEntity do let(:job) { create(:ci_build) } let(:artifact) { create(:ci_job_artifact, :codequality, expire_at: 1.hour.from_now, job: job) } diff --git a/spec/serializers/build_details_entity_spec.rb b/spec/serializers/build_details_entity_spec.rb index 92917f6ea25..ef6472e07a0 100644 --- a/spec/serializers/build_details_entity_spec.rb +++ b/spec/serializers/build_details_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BuildDetailsEntity do +RSpec.describe BuildDetailsEntity do include ProjectForksHelper let_it_be(:user) { create(:admin) } diff --git a/spec/serializers/build_serializer_spec.rb b/spec/serializers/build_serializer_spec.rb index c7bb6864361..f3584beb39b 100644 --- a/spec/serializers/build_serializer_spec.rb +++ b/spec/serializers/build_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BuildSerializer do +RSpec.describe BuildSerializer do let(:user) { create(:user) } let(:serializer) do diff --git a/spec/serializers/build_trace_entity_spec.rb b/spec/serializers/build_trace_entity_spec.rb index bafead04a51..3d967c62f99 100644 --- a/spec/serializers/build_trace_entity_spec.rb +++ b/spec/serializers/build_trace_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BuildTraceEntity do +RSpec.describe BuildTraceEntity do let(:build) { build_stubbed(:ci_build) } let(:request) { double('request') } diff --git a/spec/serializers/ci/dag_job_entity_spec.rb b/spec/serializers/ci/dag_job_entity_spec.rb index eaaf39d6bfc..fbfd1d1c77a 100644 --- a/spec/serializers/ci/dag_job_entity_spec.rb +++ b/spec/serializers/ci/dag_job_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::DagJobEntity do +RSpec.describe Ci::DagJobEntity do let_it_be(:request) { double(:request) } let(:job) { create(:ci_build, name: 'dag_job') } diff --git a/spec/serializers/ci/dag_job_group_entity_spec.rb b/spec/serializers/ci/dag_job_group_entity_spec.rb index a25723894fd..5a761919e22 100644 --- a/spec/serializers/ci/dag_job_group_entity_spec.rb +++ b/spec/serializers/ci/dag_job_group_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::DagJobGroupEntity do +RSpec.describe Ci::DagJobGroupEntity do let_it_be(:request) { double(:request) } let_it_be(:pipeline) { create(:ci_pipeline) } let_it_be(:stage) { create(:ci_stage, pipeline: pipeline) } diff --git a/spec/serializers/ci/dag_pipeline_entity_spec.rb b/spec/serializers/ci/dag_pipeline_entity_spec.rb index fab8798effc..9878826a3f3 100644 --- a/spec/serializers/ci/dag_pipeline_entity_spec.rb +++ b/spec/serializers/ci/dag_pipeline_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::DagPipelineEntity do +RSpec.describe Ci::DagPipelineEntity do let_it_be(:request) { double(:request) } let(:pipeline) { create(:ci_pipeline) } diff --git a/spec/serializers/ci/dag_pipeline_serializer_spec.rb b/spec/serializers/ci/dag_pipeline_serializer_spec.rb index abf895c3e77..35fa10ecf47 100644 --- a/spec/serializers/ci/dag_pipeline_serializer_spec.rb +++ b/spec/serializers/ci/dag_pipeline_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::DagPipelineSerializer do +RSpec.describe Ci::DagPipelineSerializer do describe '#represent' do subject { described_class.new.represent(pipeline) } diff --git a/spec/serializers/ci/dag_stage_entity_spec.rb b/spec/serializers/ci/dag_stage_entity_spec.rb index 5c6aa7faee4..ccc922d62e3 100644 --- a/spec/serializers/ci/dag_stage_entity_spec.rb +++ b/spec/serializers/ci/dag_stage_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::DagStageEntity do +RSpec.describe Ci::DagStageEntity do let_it_be(:pipeline) { create(:ci_pipeline) } let_it_be(:request) { double(:request) } diff --git a/spec/serializers/cluster_application_entity_spec.rb b/spec/serializers/cluster_application_entity_spec.rb index b81bdaa0d72..aa2bb25b17c 100644 --- a/spec/serializers/cluster_application_entity_spec.rb +++ b/spec/serializers/cluster_application_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ClusterApplicationEntity do +RSpec.describe ClusterApplicationEntity do describe '#as_json' do let(:application) { build(:clusters_applications_helm, version: '0.1.1') } diff --git a/spec/serializers/cluster_entity_spec.rb b/spec/serializers/cluster_entity_spec.rb index 16247eef655..6c692dbdbfc 100644 --- a/spec/serializers/cluster_entity_spec.rb +++ b/spec/serializers/cluster_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ClusterEntity do +RSpec.describe ClusterEntity do describe '#as_json' do subject { described_class.new(cluster).as_json } diff --git a/spec/serializers/cluster_serializer_spec.rb b/spec/serializers/cluster_serializer_spec.rb index b7d7307d40b..8034edbe599 100644 --- a/spec/serializers/cluster_serializer_spec.rb +++ b/spec/serializers/cluster_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ClusterSerializer do +RSpec.describe ClusterSerializer do let(:cluster) { create(:cluster, :project, provider_type: :user) } describe '#represent_list' do diff --git a/spec/serializers/commit_entity_spec.rb b/spec/serializers/commit_entity_spec.rb index 6abe8504b93..e2ea63893a4 100644 --- a/spec/serializers/commit_entity_spec.rb +++ b/spec/serializers/commit_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe CommitEntity do +RSpec.describe CommitEntity do let(:signature_html) { 'TEST' } let(:entity) do diff --git a/spec/serializers/container_repositories_serializer_spec.rb b/spec/serializers/container_repositories_serializer_spec.rb index 382778389b3..a0d08a8ba44 100644 --- a/spec/serializers/container_repositories_serializer_spec.rb +++ b/spec/serializers/container_repositories_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ContainerRepositoriesSerializer do +RSpec.describe ContainerRepositoriesSerializer do let(:user) { create(:user) } let(:project) { create(:project) } let(:resource) { create(:container_repository, name: 'image', project: project) } diff --git a/spec/serializers/container_repository_entity_spec.rb b/spec/serializers/container_repository_entity_spec.rb index 1f85c6e6a46..43969c63471 100644 --- a/spec/serializers/container_repository_entity_spec.rb +++ b/spec/serializers/container_repository_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ContainerRepositoryEntity do +RSpec.describe ContainerRepositoryEntity do let_it_be(:project) { create(:project) } let_it_be(:user) { create(:user) } let_it_be(:repository) { create(:container_repository, project: project) } diff --git a/spec/serializers/container_tag_entity_spec.rb b/spec/serializers/container_tag_entity_spec.rb index 8440e56f08f..8e47a6269bc 100644 --- a/spec/serializers/container_tag_entity_spec.rb +++ b/spec/serializers/container_tag_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ContainerTagEntity do +RSpec.describe ContainerTagEntity do let_it_be(:project) { create(:project) } let_it_be(:user) { create(:user) } let_it_be(:repository) { create(:container_repository, name: 'image', project: project) } diff --git a/spec/serializers/deploy_key_entity_spec.rb b/spec/serializers/deploy_key_entity_spec.rb index 0dbbf0de59b..3354db5cf8d 100644 --- a/spec/serializers/deploy_key_entity_spec.rb +++ b/spec/serializers/deploy_key_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DeployKeyEntity do +RSpec.describe DeployKeyEntity do include RequestAwareEntity let(:user) { create(:user) } diff --git a/spec/serializers/deployment_cluster_entity_spec.rb b/spec/serializers/deployment_cluster_entity_spec.rb index b22a93fcec7..95f2f8ce6fc 100644 --- a/spec/serializers/deployment_cluster_entity_spec.rb +++ b/spec/serializers/deployment_cluster_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DeploymentClusterEntity do +RSpec.describe DeploymentClusterEntity do describe '#as_json' do subject { described_class.new(deployment, request: request).as_json } diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb index 7abe74fae8f..27673b905d3 100644 --- a/spec/serializers/deployment_entity_spec.rb +++ b/spec/serializers/deployment_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DeploymentEntity do +RSpec.describe DeploymentEntity do let(:user) { developer } let(:developer) { create(:user) } let(:reporter) { create(:user) } diff --git a/spec/serializers/deployment_serializer_spec.rb b/spec/serializers/deployment_serializer_spec.rb index 67fccaa3f25..cfd43227b18 100644 --- a/spec/serializers/deployment_serializer_spec.rb +++ b/spec/serializers/deployment_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DeploymentSerializer do +RSpec.describe DeploymentSerializer do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:user, email: project.commit.author_email) } let(:resource) { create(:deployment, project: project, sha: project.commit.id) } diff --git a/spec/serializers/detailed_status_entity_spec.rb b/spec/serializers/detailed_status_entity_spec.rb index a4b51f1e02e..33ecb4572a8 100644 --- a/spec/serializers/detailed_status_entity_spec.rb +++ b/spec/serializers/detailed_status_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DetailedStatusEntity do +RSpec.describe DetailedStatusEntity do let(:entity) { described_class.new(status) } let(:status) do diff --git a/spec/serializers/diff_file_base_entity_spec.rb b/spec/serializers/diff_file_base_entity_spec.rb index 1fd697970de..2624465bcac 100644 --- a/spec/serializers/diff_file_base_entity_spec.rb +++ b/spec/serializers/diff_file_base_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DiffFileBaseEntity do +RSpec.describe DiffFileBaseEntity do let(:project) { create(:project, :repository) } let(:repository) { project.repository } let(:entity) { described_class.new(diff_file, options).as_json } diff --git a/spec/serializers/diff_file_entity_spec.rb b/spec/serializers/diff_file_entity_spec.rb index e3ecd72b275..bebe2e2dfb5 100644 --- a/spec/serializers/diff_file_entity_spec.rb +++ b/spec/serializers/diff_file_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DiffFileEntity do +RSpec.describe DiffFileEntity do include RepoHelpers let_it_be(:project) { create(:project, :repository) } diff --git a/spec/serializers/diff_line_entity_spec.rb b/spec/serializers/diff_line_entity_spec.rb index 2549f64bcd3..862b06c800a 100644 --- a/spec/serializers/diff_line_entity_spec.rb +++ b/spec/serializers/diff_line_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DiffLineEntity do +RSpec.describe DiffLineEntity do include RepoHelpers let(:code) { 'hello world' } diff --git a/spec/serializers/diff_line_serializer_spec.rb b/spec/serializers/diff_line_serializer_spec.rb index bdfcb8e2459..b91f15211de 100644 --- a/spec/serializers/diff_line_serializer_spec.rb +++ b/spec/serializers/diff_line_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DiffLineSerializer do +RSpec.describe DiffLineSerializer do let(:line) { Gitlab::Diff::Line.new('hello world', 'new', 1, nil, 1) } let(:serializer) { described_class.new.represent(line) } diff --git a/spec/serializers/diff_viewer_entity_spec.rb b/spec/serializers/diff_viewer_entity_spec.rb index 76d2728c597..53601fcff61 100644 --- a/spec/serializers/diff_viewer_entity_spec.rb +++ b/spec/serializers/diff_viewer_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DiffViewerEntity do +RSpec.describe DiffViewerEntity do include RepoHelpers let(:project) { create(:project, :repository) } diff --git a/spec/serializers/diffs_entity_spec.rb b/spec/serializers/diffs_entity_spec.rb index 435d8a6aff2..7c59e4aed83 100644 --- a/spec/serializers/diffs_entity_spec.rb +++ b/spec/serializers/diffs_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DiffsEntity do +RSpec.describe DiffsEntity do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:request) { EntityRequest.new(project: project, current_user: user) } diff --git a/spec/serializers/diffs_metadata_entity_spec.rb b/spec/serializers/diffs_metadata_entity_spec.rb index 3ed2b7c9452..8ed47569b75 100644 --- a/spec/serializers/diffs_metadata_entity_spec.rb +++ b/spec/serializers/diffs_metadata_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DiffsMetadataEntity do +RSpec.describe DiffsMetadataEntity do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:request) { EntityRequest.new(project: project, current_user: user) } diff --git a/spec/serializers/discussion_diff_file_entity_spec.rb b/spec/serializers/discussion_diff_file_entity_spec.rb index 101ac918a98..05438450d78 100644 --- a/spec/serializers/discussion_diff_file_entity_spec.rb +++ b/spec/serializers/discussion_diff_file_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DiscussionDiffFileEntity do +RSpec.describe DiscussionDiffFileEntity do include RepoHelpers let(:project) { create(:project, :repository) } diff --git a/spec/serializers/discussion_entity_spec.rb b/spec/serializers/discussion_entity_spec.rb index b441fd08b98..306a4fa43a9 100644 --- a/spec/serializers/discussion_entity_spec.rb +++ b/spec/serializers/discussion_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DiscussionEntity do +RSpec.describe DiscussionEntity do include RepoHelpers let(:user) { create(:user) } diff --git a/spec/serializers/entity_date_helper_spec.rb b/spec/serializers/entity_date_helper_spec.rb index 6f99074c3a2..a8c338675e2 100644 --- a/spec/serializers/entity_date_helper_spec.rb +++ b/spec/serializers/entity_date_helper_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe EntityDateHelper do +RSpec.describe EntityDateHelper do let(:date_helper_class) { Class.new { include EntityDateHelper }.new } it 'converts 0 seconds' do diff --git a/spec/serializers/entity_request_spec.rb b/spec/serializers/entity_request_spec.rb index 947c4b165d3..43a53b57c97 100644 --- a/spec/serializers/entity_request_spec.rb +++ b/spec/serializers/entity_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe EntityRequest do +RSpec.describe EntityRequest do subject do described_class.new(user: 'user', project: 'some project') end diff --git a/spec/serializers/environment_entity_spec.rb b/spec/serializers/environment_entity_spec.rb index 36e971c467a..6232a0d2973 100644 --- a/spec/serializers/environment_entity_spec.rb +++ b/spec/serializers/environment_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe EnvironmentEntity do +RSpec.describe EnvironmentEntity do include Gitlab::Routing.url_helpers let(:request) { double('request') } diff --git a/spec/serializers/environment_serializer_spec.rb b/spec/serializers/environment_serializer_spec.rb index 304457d83a1..1e3980b7720 100644 --- a/spec/serializers/environment_serializer_spec.rb +++ b/spec/serializers/environment_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe EnvironmentSerializer do +RSpec.describe EnvironmentSerializer do let(:user) { create(:user) } let(:project) { create(:project) } diff --git a/spec/serializers/environment_status_entity_spec.rb b/spec/serializers/environment_status_entity_spec.rb index 11455c57677..a940c4b465e 100644 --- a/spec/serializers/environment_status_entity_spec.rb +++ b/spec/serializers/environment_status_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe EnvironmentStatusEntity do +RSpec.describe EnvironmentStatusEntity do let(:user) { create(:user) } let(:request) { double('request', project: project) } diff --git a/spec/serializers/evidences/evidence_entity_spec.rb b/spec/serializers/evidences/evidence_entity_spec.rb index fa13bd21edd..8ec0422fea2 100644 --- a/spec/serializers/evidences/evidence_entity_spec.rb +++ b/spec/serializers/evidences/evidence_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Evidences::EvidenceEntity do +RSpec.describe Evidences::EvidenceEntity do let_it_be(:project) { create(:project) } let(:release) { create(:release, project: project) } let(:evidence) { build(:evidence, release: release) } diff --git a/spec/serializers/evidences/evidence_serializer_spec.rb b/spec/serializers/evidences/evidence_serializer_spec.rb index 5322f6a43fc..73d0700b7cf 100644 --- a/spec/serializers/evidences/evidence_serializer_spec.rb +++ b/spec/serializers/evidences/evidence_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Evidences::EvidenceSerializer do +RSpec.describe Evidences::EvidenceSerializer do it 'represents an EvidenceEntity entity' do expect(described_class.entity_class).to eq(Evidences::EvidenceEntity) end diff --git a/spec/serializers/evidences/issue_entity_spec.rb b/spec/serializers/evidences/issue_entity_spec.rb index 915df986887..71392d0abd9 100644 --- a/spec/serializers/evidences/issue_entity_spec.rb +++ b/spec/serializers/evidences/issue_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Evidences::IssueEntity do +RSpec.describe Evidences::IssueEntity do let(:entity) { described_class.new(build(:issue)) } subject { entity.as_json } diff --git a/spec/serializers/evidences/milestone_entity_spec.rb b/spec/serializers/evidences/milestone_entity_spec.rb index 68eb12093da..337ce966763 100644 --- a/spec/serializers/evidences/milestone_entity_spec.rb +++ b/spec/serializers/evidences/milestone_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Evidences::MilestoneEntity do +RSpec.describe Evidences::MilestoneEntity do let(:milestone) { build(:milestone) } let(:entity) { described_class.new(milestone) } diff --git a/spec/serializers/evidences/project_entity_spec.rb b/spec/serializers/evidences/project_entity_spec.rb index 01c160425a8..d5cb1a53a7e 100644 --- a/spec/serializers/evidences/project_entity_spec.rb +++ b/spec/serializers/evidences/project_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Evidences::ProjectEntity do +RSpec.describe Evidences::ProjectEntity do let(:entity) { described_class.new(build(:project)) } subject { entity.as_json } diff --git a/spec/serializers/evidences/release_entity_spec.rb b/spec/serializers/evidences/release_entity_spec.rb index 8e2be748169..63e25efc65f 100644 --- a/spec/serializers/evidences/release_entity_spec.rb +++ b/spec/serializers/evidences/release_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Evidences::ReleaseEntity do +RSpec.describe Evidences::ReleaseEntity do let(:release) { build(:release) } let(:entity) { described_class.new(release) } diff --git a/spec/serializers/evidences/release_serializer_spec.rb b/spec/serializers/evidences/release_serializer_spec.rb index a0dbf50137c..c93e0cd7c19 100644 --- a/spec/serializers/evidences/release_serializer_spec.rb +++ b/spec/serializers/evidences/release_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Evidences::ReleaseSerializer do +RSpec.describe Evidences::ReleaseSerializer do it 'represents an Evidence::ReleaseEntity entity' do expect(described_class.entity_class).to eq(Evidences::ReleaseEntity) end diff --git a/spec/serializers/group_child_entity_spec.rb b/spec/serializers/group_child_entity_spec.rb index cae263e7fd5..7f330da44a7 100644 --- a/spec/serializers/group_child_entity_spec.rb +++ b/spec/serializers/group_child_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupChildEntity do +RSpec.describe GroupChildEntity do include ExternalAuthorizationServiceHelpers include Gitlab::Routing.url_helpers diff --git a/spec/serializers/group_child_serializer_spec.rb b/spec/serializers/group_child_serializer_spec.rb index 92f083ed23e..63582019d32 100644 --- a/spec/serializers/group_child_serializer_spec.rb +++ b/spec/serializers/group_child_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupChildSerializer do +RSpec.describe GroupChildSerializer do let(:request) { double('request') } let(:user) { create(:user) } diff --git a/spec/serializers/group_variable_entity_spec.rb b/spec/serializers/group_variable_entity_spec.rb index e6b51e0d626..17efe2d2022 100644 --- a/spec/serializers/group_variable_entity_spec.rb +++ b/spec/serializers/group_variable_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupVariableEntity do +RSpec.describe GroupVariableEntity do let(:variable) { create(:ci_group_variable) } let(:entity) { described_class.new(variable) } diff --git a/spec/serializers/issuable_sidebar_extras_entity_spec.rb b/spec/serializers/issuable_sidebar_extras_entity_spec.rb index a1a7c554b49..f49b9acfd5d 100644 --- a/spec/serializers/issuable_sidebar_extras_entity_spec.rb +++ b/spec/serializers/issuable_sidebar_extras_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IssuableSidebarExtrasEntity do +RSpec.describe IssuableSidebarExtrasEntity do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:resource) { create(:issue, project: project) } diff --git a/spec/serializers/issue_board_entity_spec.rb b/spec/serializers/issue_board_entity_spec.rb index d013b27369b..e60a063b9eb 100644 --- a/spec/serializers/issue_board_entity_spec.rb +++ b/spec/serializers/issue_board_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IssueBoardEntity do +RSpec.describe IssueBoardEntity do let_it_be(:project) { create(:project) } let_it_be(:resource) { create(:issue, project: project) } let_it_be(:user) { create(:user) } diff --git a/spec/serializers/issue_entity_spec.rb b/spec/serializers/issue_entity_spec.rb index a1868b2631b..5c5ac184778 100644 --- a/spec/serializers/issue_entity_spec.rb +++ b/spec/serializers/issue_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IssueEntity do +RSpec.describe IssueEntity do let(:project) { create(:project) } let(:resource) { create(:issue, project: project) } let(:user) { create(:user) } diff --git a/spec/serializers/issue_serializer_spec.rb b/spec/serializers/issue_serializer_spec.rb index e25becc4709..a51297d6d80 100644 --- a/spec/serializers/issue_serializer_spec.rb +++ b/spec/serializers/issue_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IssueSerializer do +RSpec.describe IssueSerializer do let(:resource) { create(:issue) } let(:user) { create(:user) } let(:json_entity) do diff --git a/spec/serializers/job_artifact_report_entity_spec.rb b/spec/serializers/job_artifact_report_entity_spec.rb index 3cd12f0e9fe..1aaaad544ba 100644 --- a/spec/serializers/job_artifact_report_entity_spec.rb +++ b/spec/serializers/job_artifact_report_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe JobArtifactReportEntity do +RSpec.describe JobArtifactReportEntity do let(:report) { create(:ci_job_artifact, :codequality) } let(:entity) { described_class.new(report, request: double) } diff --git a/spec/serializers/job_entity_spec.rb b/spec/serializers/job_entity_spec.rb index 60843f1a599..02262be9511 100644 --- a/spec/serializers/job_entity_spec.rb +++ b/spec/serializers/job_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe JobEntity do +RSpec.describe JobEntity do let(:user) { create(:user) } let(:job) { create(:ci_build) } let(:project) { job.project } diff --git a/spec/serializers/label_serializer_spec.rb b/spec/serializers/label_serializer_spec.rb index 7e1bb2cc127..ae1466b16e5 100644 --- a/spec/serializers/label_serializer_spec.rb +++ b/spec/serializers/label_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe LabelSerializer do +RSpec.describe LabelSerializer do let(:user) { create(:user) } let(:serializer) do diff --git a/spec/serializers/lfs_file_lock_entity_spec.rb b/spec/serializers/lfs_file_lock_entity_spec.rb index 4ffffad7d5a..5869941c920 100644 --- a/spec/serializers/lfs_file_lock_entity_spec.rb +++ b/spec/serializers/lfs_file_lock_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe LfsFileLockEntity do +RSpec.describe LfsFileLockEntity do let(:user) { create(:user) } let(:resource) { create(:lfs_file_lock, user: user) } diff --git a/spec/serializers/merge_request_basic_entity_spec.rb b/spec/serializers/merge_request_basic_entity_spec.rb index 53ba66a79ac..1cddd87e917 100644 --- a/spec/serializers/merge_request_basic_entity_spec.rb +++ b/spec/serializers/merge_request_basic_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestBasicEntity do +RSpec.describe MergeRequestBasicEntity do let(:resource) { build(:merge_request) } subject do diff --git a/spec/serializers/merge_request_diff_entity_spec.rb b/spec/serializers/merge_request_diff_entity_spec.rb index 2e3b0d092fe..542ef6cb3c3 100644 --- a/spec/serializers/merge_request_diff_entity_spec.rb +++ b/spec/serializers/merge_request_diff_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestDiffEntity do +RSpec.describe MergeRequestDiffEntity do let_it_be(:project) { create(:project, :repository) } let(:request) { EntityRequest.new(project: project) } let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) } diff --git a/spec/serializers/merge_request_for_pipeline_entity_spec.rb b/spec/serializers/merge_request_for_pipeline_entity_spec.rb index b39fbce8c3a..ed66716974a 100644 --- a/spec/serializers/merge_request_for_pipeline_entity_spec.rb +++ b/spec/serializers/merge_request_for_pipeline_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestForPipelineEntity do +RSpec.describe MergeRequestForPipelineEntity do let(:project) { create(:project, :repository) } let(:user) { create(:user) } let(:request) { EntityRequest.new(project: project) } diff --git a/spec/serializers/merge_request_poll_cached_widget_entity_spec.rb b/spec/serializers/merge_request_poll_cached_widget_entity_spec.rb index 9f96e5711a4..1357f7cf624 100644 --- a/spec/serializers/merge_request_poll_cached_widget_entity_spec.rb +++ b/spec/serializers/merge_request_poll_cached_widget_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestPollCachedWidgetEntity do +RSpec.describe MergeRequestPollCachedWidgetEntity do include ProjectForksHelper let(:project) { create :project, :repository } diff --git a/spec/serializers/merge_request_poll_widget_entity_spec.rb b/spec/serializers/merge_request_poll_widget_entity_spec.rb index 4b3bfc99c88..2b6159e883d 100644 --- a/spec/serializers/merge_request_poll_widget_entity_spec.rb +++ b/spec/serializers/merge_request_poll_widget_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestPollWidgetEntity do +RSpec.describe MergeRequestPollWidgetEntity do include ProjectForksHelper let(:project) { create :project, :repository } diff --git a/spec/serializers/merge_request_serializer_spec.rb b/spec/serializers/merge_request_serializer_spec.rb index 90b3efae412..a2ce1ed4ac2 100644 --- a/spec/serializers/merge_request_serializer_spec.rb +++ b/spec/serializers/merge_request_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestSerializer do +RSpec.describe MergeRequestSerializer do let_it_be(:user) { create(:user) } let_it_be(:resource) { create(:merge_request, description: "Description") } diff --git a/spec/serializers/merge_request_sidebar_basic_entity_spec.rb b/spec/serializers/merge_request_sidebar_basic_entity_spec.rb index b2db57801ea..e950e6d6592 100644 --- a/spec/serializers/merge_request_sidebar_basic_entity_spec.rb +++ b/spec/serializers/merge_request_sidebar_basic_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestSidebarBasicEntity do +RSpec.describe MergeRequestSidebarBasicEntity do let(:project) { create :project, :repository } let(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let(:user) { create(:user) } diff --git a/spec/serializers/merge_request_user_entity_spec.rb b/spec/serializers/merge_request_user_entity_spec.rb index 47b9b0a57ab..8d6f066481e 100644 --- a/spec/serializers/merge_request_user_entity_spec.rb +++ b/spec/serializers/merge_request_user_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestUserEntity do +RSpec.describe MergeRequestUserEntity do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:request) { EntityRequest.new(project: project, current_user: user) } diff --git a/spec/serializers/merge_request_widget_commit_entity_spec.rb b/spec/serializers/merge_request_widget_commit_entity_spec.rb index ce83978c49a..0d13308f27d 100644 --- a/spec/serializers/merge_request_widget_commit_entity_spec.rb +++ b/spec/serializers/merge_request_widget_commit_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestWidgetCommitEntity do +RSpec.describe MergeRequestWidgetCommitEntity do let(:project) { create(:project, :repository) } let(:commit) { project.commit } let(:request) { double('request') } diff --git a/spec/serializers/merge_request_widget_entity_spec.rb b/spec/serializers/merge_request_widget_entity_spec.rb index 76d4e8d9fea..37645f778d9 100644 --- a/spec/serializers/merge_request_widget_entity_spec.rb +++ b/spec/serializers/merge_request_widget_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestWidgetEntity do +RSpec.describe MergeRequestWidgetEntity do include ProjectForksHelper let(:project) { create :project, :repository } diff --git a/spec/serializers/move_to_project_entity_spec.rb b/spec/serializers/move_to_project_entity_spec.rb index ac495eadb68..a14bc3ae622 100644 --- a/spec/serializers/move_to_project_entity_spec.rb +++ b/spec/serializers/move_to_project_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MoveToProjectEntity do +RSpec.describe MoveToProjectEntity do describe '#as_json' do let(:project) { build(:project, id: 1) } diff --git a/spec/serializers/move_to_project_serializer_spec.rb b/spec/serializers/move_to_project_serializer_spec.rb index 841ac969eeb..60bcca3269f 100644 --- a/spec/serializers/move_to_project_serializer_spec.rb +++ b/spec/serializers/move_to_project_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MoveToProjectSerializer do +RSpec.describe MoveToProjectSerializer do describe '#represent' do it 'includes the name and name with namespace' do project = build(:project, id: 1) diff --git a/spec/serializers/namespace_basic_entity_spec.rb b/spec/serializers/namespace_basic_entity_spec.rb index d3d666d57aa..8b69af5696a 100644 --- a/spec/serializers/namespace_basic_entity_spec.rb +++ b/spec/serializers/namespace_basic_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe NamespaceBasicEntity do +RSpec.describe NamespaceBasicEntity do let_it_be(:group) { create(:group) } let(:entity) do described_class.represent(group) diff --git a/spec/serializers/namespace_serializer_spec.rb b/spec/serializers/namespace_serializer_spec.rb index 6e5bdd8c52d..0c4b099ef60 100644 --- a/spec/serializers/namespace_serializer_spec.rb +++ b/spec/serializers/namespace_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe NamespaceSerializer do +RSpec.describe NamespaceSerializer do it 'represents NamespaceBasicEntity entities' do expect(described_class.entity_class).to eq(NamespaceBasicEntity) end diff --git a/spec/serializers/note_entity_spec.rb b/spec/serializers/note_entity_spec.rb index f37fffb5048..19438e69a10 100644 --- a/spec/serializers/note_entity_spec.rb +++ b/spec/serializers/note_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe NoteEntity do +RSpec.describe NoteEntity do include Gitlab::Routing let(:request) { double('request', current_user: user, noteable: note.noteable) } diff --git a/spec/serializers/paginated_diff_entity_spec.rb b/spec/serializers/paginated_diff_entity_spec.rb index a6b83cb4286..30360b00537 100644 --- a/spec/serializers/paginated_diff_entity_spec.rb +++ b/spec/serializers/paginated_diff_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PaginatedDiffEntity do +RSpec.describe PaginatedDiffEntity do let(:user) { create(:user) } let(:request) { double('request', current_user: user) } let(:merge_request) { create(:merge_request, :with_diffs) } diff --git a/spec/serializers/pipeline_details_entity_spec.rb b/spec/serializers/pipeline_details_entity_spec.rb index 849dab102c2..55bb9720957 100644 --- a/spec/serializers/pipeline_details_entity_spec.rb +++ b/spec/serializers/pipeline_details_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PipelineDetailsEntity do +RSpec.describe PipelineDetailsEntity do let_it_be(:user) { create(:user) } let(:request) { double('request') } diff --git a/spec/serializers/pipeline_entity_spec.rb b/spec/serializers/pipeline_entity_spec.rb index 914f42054bd..41b34825699 100644 --- a/spec/serializers/pipeline_entity_spec.rb +++ b/spec/serializers/pipeline_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PipelineEntity do +RSpec.describe PipelineEntity do include Gitlab::Routing let_it_be(:project) { create(:project) } diff --git a/spec/serializers/pipeline_serializer_spec.rb b/spec/serializers/pipeline_serializer_spec.rb index c8f25423f85..c3a0766e6f7 100644 --- a/spec/serializers/pipeline_serializer_spec.rb +++ b/spec/serializers/pipeline_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PipelineSerializer do +RSpec.describe PipelineSerializer do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:user) } diff --git a/spec/serializers/project_import_entity_spec.rb b/spec/serializers/project_import_entity_spec.rb index 9ccae798091..1481d4122ae 100644 --- a/spec/serializers/project_import_entity_spec.rb +++ b/spec/serializers/project_import_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectImportEntity do +RSpec.describe ProjectImportEntity do include ImportHelper let_it_be(:project) { create(:project, import_status: :started, import_source: 'namespace/project') } diff --git a/spec/serializers/project_mirror_entity_spec.rb b/spec/serializers/project_mirror_entity_spec.rb index 0d64199ecf6..7ed530ed9e8 100644 --- a/spec/serializers/project_mirror_entity_spec.rb +++ b/spec/serializers/project_mirror_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectMirrorEntity do +RSpec.describe ProjectMirrorEntity do let(:project) { create(:project, :repository, :remote_mirror) } let(:entity) { described_class.new(project) } diff --git a/spec/serializers/project_mirror_serializer_spec.rb b/spec/serializers/project_mirror_serializer_spec.rb index b50c2267ced..0d83e25e27b 100644 --- a/spec/serializers/project_mirror_serializer_spec.rb +++ b/spec/serializers/project_mirror_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectMirrorSerializer do +RSpec.describe ProjectMirrorSerializer do it 'represents ProjectMirror entities' do expect(described_class.entity_class).to eq(ProjectMirrorEntity) end diff --git a/spec/serializers/project_note_entity_spec.rb b/spec/serializers/project_note_entity_spec.rb index 469bf2b86de..aaf7764a123 100644 --- a/spec/serializers/project_note_entity_spec.rb +++ b/spec/serializers/project_note_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectNoteEntity do +RSpec.describe ProjectNoteEntity do include Gitlab::Routing let(:request) { double('request', current_user: user, noteable: note.noteable) } diff --git a/spec/serializers/project_serializer_spec.rb b/spec/serializers/project_serializer_spec.rb index ef3dd1dc15e..4bf0657129f 100644 --- a/spec/serializers/project_serializer_spec.rb +++ b/spec/serializers/project_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectSerializer do +RSpec.describe ProjectSerializer do let_it_be(:project) { create(:project) } let(:provider_url) { 'http://provider.com' } diff --git a/spec/serializers/prometheus_alert_entity_spec.rb b/spec/serializers/prometheus_alert_entity_spec.rb index 2b6d8b62c4d..aeee8de2a5b 100644 --- a/spec/serializers/prometheus_alert_entity_spec.rb +++ b/spec/serializers/prometheus_alert_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PrometheusAlertEntity do +RSpec.describe PrometheusAlertEntity do let(:user) { create(:user) } let(:prometheus_alert) { create(:prometheus_alert) } let(:request) { double('prometheus_alert', current_user: user) } diff --git a/spec/serializers/remote_mirror_entity_spec.rb b/spec/serializers/remote_mirror_entity_spec.rb index 27472c46436..4cbf87e4d67 100644 --- a/spec/serializers/remote_mirror_entity_spec.rb +++ b/spec/serializers/remote_mirror_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe RemoteMirrorEntity do +RSpec.describe RemoteMirrorEntity do let(:project) { create(:project, :repository, :remote_mirror, url: "https://test:password@gitlab.com") } let(:remote_mirror) { project.remote_mirrors.first } let(:entity) { described_class.new(remote_mirror) } diff --git a/spec/serializers/request_aware_entity_spec.rb b/spec/serializers/request_aware_entity_spec.rb index 8ddb35f5f61..d5e87f0a618 100644 --- a/spec/serializers/request_aware_entity_spec.rb +++ b/spec/serializers/request_aware_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe RequestAwareEntity do +RSpec.describe RequestAwareEntity do subject do Class.new.include(described_class).new end diff --git a/spec/serializers/review_app_setup_entity_spec.rb b/spec/serializers/review_app_setup_entity_spec.rb index 19949fa9282..0893d7ee47f 100644 --- a/spec/serializers/review_app_setup_entity_spec.rb +++ b/spec/serializers/review_app_setup_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ReviewAppSetupEntity do +RSpec.describe ReviewAppSetupEntity do let_it_be(:user) { create(:admin) } let(:project) { create(:project) } let(:presenter) { ProjectPresenter.new(project, current_user: user) } diff --git a/spec/serializers/runner_entity_spec.rb b/spec/serializers/runner_entity_spec.rb index 11a6aba431b..84c7d1720e2 100644 --- a/spec/serializers/runner_entity_spec.rb +++ b/spec/serializers/runner_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe RunnerEntity do +RSpec.describe RunnerEntity do let(:project) { create(:project) } let(:runner) { create(:ci_runner, :project, projects: [project]) } let(:entity) { described_class.new(runner, request: request, current_user: user) } diff --git a/spec/serializers/serverless/domain_entity_spec.rb b/spec/serializers/serverless/domain_entity_spec.rb index bdf0ccb176c..4d73a0f651a 100644 --- a/spec/serializers/serverless/domain_entity_spec.rb +++ b/spec/serializers/serverless/domain_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Serverless::DomainEntity do +RSpec.describe Serverless::DomainEntity do describe '#as_json' do let(:domain) { create(:pages_domain, :instance_serverless) } diff --git a/spec/serializers/service_event_entity_spec.rb b/spec/serializers/service_event_entity_spec.rb index fc11263807b..09bb8bca43b 100644 --- a/spec/serializers/service_event_entity_spec.rb +++ b/spec/serializers/service_event_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ServiceEventEntity do +RSpec.describe ServiceEventEntity do let(:request) { double('request') } subject { described_class.new(event, request: request, service: service).as_json } diff --git a/spec/serializers/service_field_entity_spec.rb b/spec/serializers/service_field_entity_spec.rb index 277890d143a..39f8d27e963 100644 --- a/spec/serializers/service_field_entity_spec.rb +++ b/spec/serializers/service_field_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ServiceFieldEntity do +RSpec.describe ServiceFieldEntity do let(:request) { double('request') } subject { described_class.new(field, request: request, service: service).as_json } diff --git a/spec/serializers/stage_entity_spec.rb b/spec/serializers/stage_entity_spec.rb index fb08d6994ae..b977d5d33aa 100644 --- a/spec/serializers/stage_entity_spec.rb +++ b/spec/serializers/stage_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe StageEntity do +RSpec.describe StageEntity do let(:pipeline) { create(:ci_pipeline) } let(:request) { double('request') } let(:user) { create(:user) } diff --git a/spec/serializers/stage_serializer_spec.rb b/spec/serializers/stage_serializer_spec.rb index aae17cfbcb9..0b5e87dc95b 100644 --- a/spec/serializers/stage_serializer_spec.rb +++ b/spec/serializers/stage_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe StageSerializer do +RSpec.describe StageSerializer do let(:project) { create(:project, :repository) } let(:user) { create(:user) } let(:resource) { create(:ci_stage_entity) } diff --git a/spec/serializers/suggestion_entity_spec.rb b/spec/serializers/suggestion_entity_spec.rb index d282a7f9c7a..0f336bdc604 100644 --- a/spec/serializers/suggestion_entity_spec.rb +++ b/spec/serializers/suggestion_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SuggestionEntity do +RSpec.describe SuggestionEntity do include RepoHelpers let(:user) { create(:user) } diff --git a/spec/serializers/test_case_entity_spec.rb b/spec/serializers/test_case_entity_spec.rb index 9f1822ff581..bd2a1b0fb98 100644 --- a/spec/serializers/test_case_entity_spec.rb +++ b/spec/serializers/test_case_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TestCaseEntity do +RSpec.describe TestCaseEntity do include TestReportsHelper let(:entity) { described_class.new(test_case) } diff --git a/spec/serializers/test_report_entity_spec.rb b/spec/serializers/test_report_entity_spec.rb index 5913d1c0208..549b14c04dc 100644 --- a/spec/serializers/test_report_entity_spec.rb +++ b/spec/serializers/test_report_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TestReportEntity do +RSpec.describe TestReportEntity do let(:pipeline) { create(:ci_pipeline, :with_test_reports) } let(:entity) { described_class.new(pipeline.test_reports) } diff --git a/spec/serializers/test_reports_comparer_entity_spec.rb b/spec/serializers/test_reports_comparer_entity_spec.rb index e7dabc67325..3f88438ccde 100644 --- a/spec/serializers/test_reports_comparer_entity_spec.rb +++ b/spec/serializers/test_reports_comparer_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TestReportsComparerEntity do +RSpec.describe TestReportsComparerEntity do include TestReportsHelper let(:entity) { described_class.new(comparer) } diff --git a/spec/serializers/test_reports_comparer_serializer_spec.rb b/spec/serializers/test_reports_comparer_serializer_spec.rb index 0d833afe9e4..f9c37f49039 100644 --- a/spec/serializers/test_reports_comparer_serializer_spec.rb +++ b/spec/serializers/test_reports_comparer_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TestReportsComparerSerializer do +RSpec.describe TestReportsComparerSerializer do include TestReportsHelper let(:project) { double(:project) } diff --git a/spec/serializers/test_suite_comparer_entity_spec.rb b/spec/serializers/test_suite_comparer_entity_spec.rb index 9790777a570..882991a6208 100644 --- a/spec/serializers/test_suite_comparer_entity_spec.rb +++ b/spec/serializers/test_suite_comparer_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TestSuiteComparerEntity do +RSpec.describe TestSuiteComparerEntity do include TestReportsHelper let(:entity) { described_class.new(comparer) } diff --git a/spec/serializers/trigger_variable_entity_spec.rb b/spec/serializers/trigger_variable_entity_spec.rb index f5a21f943d8..e90bfc24f9f 100644 --- a/spec/serializers/trigger_variable_entity_spec.rb +++ b/spec/serializers/trigger_variable_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TriggerVariableEntity do +RSpec.describe TriggerVariableEntity do let(:project) { create(:project) } let(:request) { double('request') } let(:user) { create(:user) } diff --git a/spec/serializers/user_entity_spec.rb b/spec/serializers/user_entity_spec.rb index 71107daf6ac..e9d86fe7282 100644 --- a/spec/serializers/user_entity_spec.rb +++ b/spec/serializers/user_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserEntity do +RSpec.describe UserEntity do include Gitlab::Routing let(:entity) { described_class.new(user) } diff --git a/spec/serializers/user_serializer_spec.rb b/spec/serializers/user_serializer_spec.rb index 2e4a8c644fe..d54f33b6a23 100644 --- a/spec/serializers/user_serializer_spec.rb +++ b/spec/serializers/user_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserSerializer do +RSpec.describe UserSerializer do let(:user1) { create(:user) } let(:user2) { create(:user) } diff --git a/spec/serializers/variable_entity_spec.rb b/spec/serializers/variable_entity_spec.rb index 3cb18dab314..0b20207d815 100644 --- a/spec/serializers/variable_entity_spec.rb +++ b/spec/serializers/variable_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe VariableEntity do +RSpec.describe VariableEntity do let(:variable) { create(:ci_variable) } let(:entity) { described_class.new(variable) } diff --git a/spec/serializers/web_ide_terminal_entity_spec.rb b/spec/serializers/web_ide_terminal_entity_spec.rb index e163afa14ed..a6f108bf25e 100644 --- a/spec/serializers/web_ide_terminal_entity_spec.rb +++ b/spec/serializers/web_ide_terminal_entity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe WebIdeTerminalEntity do +RSpec.describe WebIdeTerminalEntity do let(:build) { create(:ci_build) } let(:entity) { described_class.new(WebIdeTerminal.new(build)) } diff --git a/spec/serializers/web_ide_terminal_serializer_spec.rb b/spec/serializers/web_ide_terminal_serializer_spec.rb index 01133deaf84..7ddc4bfedc8 100644 --- a/spec/serializers/web_ide_terminal_serializer_spec.rb +++ b/spec/serializers/web_ide_terminal_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe WebIdeTerminalSerializer do +RSpec.describe WebIdeTerminalSerializer do let(:build) { create(:ci_build) } subject { described_class.new.represent(WebIdeTerminal.new(build)) } diff --git a/spec/services/access_token_validation_service_spec.rb b/spec/services/access_token_validation_service_spec.rb index b2a8da6c4c6..2bf74d64dc9 100644 --- a/spec/services/access_token_validation_service_spec.rb +++ b/spec/services/access_token_validation_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AccessTokenValidationService do +RSpec.describe AccessTokenValidationService do describe ".include_any_scope?" do let(:request) { double("request") } diff --git a/spec/services/alert_management/update_alert_status_service_spec.rb b/spec/services/alert_management/update_alert_status_service_spec.rb index b287d0d1614..6883591282f 100644 --- a/spec/services/alert_management/update_alert_status_service_spec.rb +++ b/spec/services/alert_management/update_alert_status_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AlertManagement::UpdateAlertStatusService do +RSpec.describe AlertManagement::UpdateAlertStatusService do let(:project) { alert.project } let_it_be(:user) { build(:user) } diff --git a/spec/services/application_settings/update_service_spec.rb b/spec/services/application_settings/update_service_spec.rb index 3a37cbc3522..e5060fa2eeb 100644 --- a/spec/services/application_settings/update_service_spec.rb +++ b/spec/services/application_settings/update_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ApplicationSettings::UpdateService do +RSpec.describe ApplicationSettings::UpdateService do include ExternalAuthorizationServiceHelpers let(:application_settings) { create(:application_setting) } diff --git a/spec/services/applications/create_service_spec.rb b/spec/services/applications/create_service_spec.rb index c8134087fa1..58ac723ee55 100644 --- a/spec/services/applications/create_service_spec.rb +++ b/spec/services/applications/create_service_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe ::Applications::CreateService do +RSpec.describe ::Applications::CreateService do include TestRequestHelpers let(:user) { create(:user) } diff --git a/spec/services/audit_event_service_spec.rb b/spec/services/audit_event_service_spec.rb index dc86735805c..206ef280349 100644 --- a/spec/services/audit_event_service_spec.rb +++ b/spec/services/audit_event_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AuditEventService do +RSpec.describe AuditEventService do let(:project) { create(:project) } let(:user) { create(:user, :with_sign_ins) } let(:project_member) { create(:project_member, user: user) } diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb index 70eb35f0826..8d58c4b27e1 100644 --- a/spec/services/auth/container_registry_authentication_service_spec.rb +++ b/spec/services/auth/container_registry_authentication_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Auth::ContainerRegistryAuthenticationService do +RSpec.describe Auth::ContainerRegistryAuthenticationService do let(:current_project) { nil } let(:current_user) { nil } let(:current_params) { {} } diff --git a/spec/services/authorized_project_update/project_create_service_spec.rb b/spec/services/authorized_project_update/project_create_service_spec.rb index 5b3e36af766..891800bfb87 100644 --- a/spec/services/authorized_project_update/project_create_service_spec.rb +++ b/spec/services/authorized_project_update/project_create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AuthorizedProjectUpdate::ProjectCreateService do +RSpec.describe AuthorizedProjectUpdate::ProjectCreateService do let_it_be(:group_parent) { create(:group, :private) } let_it_be(:group) { create(:group, :private, parent: group_parent) } let_it_be(:group_child) { create(:group, :private, parent: group) } diff --git a/spec/services/auto_merge/base_service_spec.rb b/spec/services/auto_merge/base_service_spec.rb index e08e1d670bf..9673a65344d 100644 --- a/spec/services/auto_merge/base_service_spec.rb +++ b/spec/services/auto_merge/base_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AutoMerge::BaseService do +RSpec.describe AutoMerge::BaseService do let(:project) { create(:project) } let(:user) { create(:user) } let(:service) { described_class.new(project, user, params) } diff --git a/spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb b/spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb index b6e8d3c636a..092742276d3 100644 --- a/spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb +++ b/spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AutoMerge::MergeWhenPipelineSucceedsService do +RSpec.describe AutoMerge::MergeWhenPipelineSucceedsService do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :repository) } diff --git a/spec/services/auto_merge_service_spec.rb b/spec/services/auto_merge_service_spec.rb index bab69fb4aa3..eab95973e1b 100644 --- a/spec/services/auto_merge_service_spec.rb +++ b/spec/services/auto_merge_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AutoMergeService do +RSpec.describe AutoMergeService do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:user) } let(:service) { described_class.new(project, user) } diff --git a/spec/services/award_emojis/add_service_spec.rb b/spec/services/award_emojis/add_service_spec.rb index 4bcb5fa039f..85c39015614 100644 --- a/spec/services/award_emojis/add_service_spec.rb +++ b/spec/services/award_emojis/add_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AwardEmojis::AddService do +RSpec.describe AwardEmojis::AddService do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:awardable) { create(:note, project: project) } diff --git a/spec/services/award_emojis/collect_user_emoji_service_spec.rb b/spec/services/award_emojis/collect_user_emoji_service_spec.rb index a0dea31b403..bf5aa0eb9ef 100644 --- a/spec/services/award_emojis/collect_user_emoji_service_spec.rb +++ b/spec/services/award_emojis/collect_user_emoji_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AwardEmojis::CollectUserEmojiService do +RSpec.describe AwardEmojis::CollectUserEmojiService do describe '#execute' do it 'returns an Array containing the awarded emoji names' do user = create(:user) diff --git a/spec/services/award_emojis/destroy_service_spec.rb b/spec/services/award_emojis/destroy_service_spec.rb index f411345560e..2aba078b638 100644 --- a/spec/services/award_emojis/destroy_service_spec.rb +++ b/spec/services/award_emojis/destroy_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AwardEmojis::DestroyService do +RSpec.describe AwardEmojis::DestroyService do let_it_be(:user) { create(:user) } let_it_be(:awardable) { create(:note) } let_it_be(:project) { awardable.project } diff --git a/spec/services/award_emojis/toggle_service_spec.rb b/spec/services/award_emojis/toggle_service_spec.rb index 069bdfcb99f..a7feeed50c6 100644 --- a/spec/services/award_emojis/toggle_service_spec.rb +++ b/spec/services/award_emojis/toggle_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AwardEmojis::ToggleService do +RSpec.describe AwardEmojis::ToggleService do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :public) } let_it_be(:awardable) { create(:note, project: project) } diff --git a/spec/services/base_container_service_spec.rb b/spec/services/base_container_service_spec.rb index 47cfb387e25..1de79eec702 100644 --- a/spec/services/base_container_service_spec.rb +++ b/spec/services/base_container_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BaseContainerService do +RSpec.describe BaseContainerService do let(:project) { Project.new } let(:user) { User.new } diff --git a/spec/services/base_count_service_spec.rb b/spec/services/base_count_service_spec.rb index 275bec9982d..18cab2e8e9a 100644 --- a/spec/services/base_count_service_spec.rb +++ b/spec/services/base_count_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BaseCountService, :use_clean_rails_memory_store_caching do +RSpec.describe BaseCountService, :use_clean_rails_memory_store_caching do let(:service) { described_class.new } describe '#relation_for_count' do diff --git a/spec/services/boards/create_service_spec.rb b/spec/services/boards/create_service_spec.rb index 7d4fb04c6c0..f6a9f0903ce 100644 --- a/spec/services/boards/create_service_spec.rb +++ b/spec/services/boards/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::CreateService do +RSpec.describe Boards::CreateService do describe '#execute' do context 'when board parent is a project' do let(:parent) { create(:project) } diff --git a/spec/services/boards/issues/create_service_spec.rb b/spec/services/boards/issues/create_service_spec.rb index 3520630dd83..9a6b48c13bf 100644 --- a/spec/services/boards/issues/create_service_spec.rb +++ b/spec/services/boards/issues/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Issues::CreateService do +RSpec.describe Boards::Issues::CreateService do describe '#execute' do let(:project) { create(:project) } let(:board) { create(:board, project: project) } diff --git a/spec/services/boards/issues/list_service_spec.rb b/spec/services/boards/issues/list_service_spec.rb index c46ab004af6..29b49db42f9 100644 --- a/spec/services/boards/issues/list_service_spec.rb +++ b/spec/services/boards/issues/list_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Issues::ListService do +RSpec.describe Boards::Issues::ListService do describe '#execute' do context 'when parent is a project' do let(:user) { create(:user) } diff --git a/spec/services/boards/issues/move_service_spec.rb b/spec/services/boards/issues/move_service_spec.rb index b9ebbc30c1a..01a3ec72987 100644 --- a/spec/services/boards/issues/move_service_spec.rb +++ b/spec/services/boards/issues/move_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Issues::MoveService do +RSpec.describe Boards::Issues::MoveService do describe '#execute' do context 'when parent is a project' do let(:user) { create(:user) } diff --git a/spec/services/boards/list_service_spec.rb b/spec/services/boards/list_service_spec.rb index 4eb023907fa..7c94332a78d 100644 --- a/spec/services/boards/list_service_spec.rb +++ b/spec/services/boards/list_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::ListService do +RSpec.describe Boards::ListService do describe '#execute' do context 'when board parent is a project' do let(:parent) { create(:project) } diff --git a/spec/services/boards/lists/create_service_spec.rb b/spec/services/boards/lists/create_service_spec.rb index 295ec2c8156..f3d4e62eeca 100644 --- a/spec/services/boards/lists/create_service_spec.rb +++ b/spec/services/boards/lists/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Lists::CreateService do +RSpec.describe Boards::Lists::CreateService do describe '#execute' do shared_examples 'creating board lists' do let(:user) { create(:user) } diff --git a/spec/services/boards/lists/destroy_service_spec.rb b/spec/services/boards/lists/destroy_service_spec.rb index b936ef3837f..4c512b96065 100644 --- a/spec/services/boards/lists/destroy_service_spec.rb +++ b/spec/services/boards/lists/destroy_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Lists::DestroyService do +RSpec.describe Boards::Lists::DestroyService do describe '#execute' do context 'when board parent is a project' do let(:project) { create(:project) } diff --git a/spec/services/boards/lists/generate_service_spec.rb b/spec/services/boards/lists/generate_service_spec.rb index 77b42392470..9597c8e0f54 100644 --- a/spec/services/boards/lists/generate_service_spec.rb +++ b/spec/services/boards/lists/generate_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Lists::GenerateService do +RSpec.describe Boards::Lists::GenerateService do describe '#execute' do let(:project) { create(:project) } let(:board) { create(:board, project: project) } diff --git a/spec/services/boards/lists/list_service_spec.rb b/spec/services/boards/lists/list_service_spec.rb index 2535f339495..3d71c467e96 100644 --- a/spec/services/boards/lists/list_service_spec.rb +++ b/spec/services/boards/lists/list_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Lists::ListService do +RSpec.describe Boards::Lists::ListService do let(:user) { create(:user) } describe '#execute' do diff --git a/spec/services/boards/lists/move_service_spec.rb b/spec/services/boards/lists/move_service_spec.rb index f8fc70ef2d6..2861fc48b4d 100644 --- a/spec/services/boards/lists/move_service_spec.rb +++ b/spec/services/boards/lists/move_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Lists::MoveService do +RSpec.describe Boards::Lists::MoveService do describe '#execute' do context 'when board parent is a project' do let(:project) { create(:project) } diff --git a/spec/services/boards/lists/update_service_spec.rb b/spec/services/boards/lists/update_service_spec.rb index 243e0fc50ad..cdc7784469a 100644 --- a/spec/services/boards/lists/update_service_spec.rb +++ b/spec/services/boards/lists/update_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Lists::UpdateService do +RSpec.describe Boards::Lists::UpdateService do let(:user) { create(:user) } let!(:list) { create(:list, board: board, position: 0) } diff --git a/spec/services/boards/visits/create_service_spec.rb b/spec/services/boards/visits/create_service_spec.rb index 203c287f396..a9a8754825b 100644 --- a/spec/services/boards/visits/create_service_spec.rb +++ b/spec/services/boards/visits/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::Visits::CreateService do +RSpec.describe Boards::Visits::CreateService do describe '#execute' do let(:user) { create(:user) } diff --git a/spec/services/branches/create_service_spec.rb b/spec/services/branches/create_service_spec.rb index 072a86d17fc..b682a3f26ec 100644 --- a/spec/services/branches/create_service_spec.rb +++ b/spec/services/branches/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Branches::CreateService do +RSpec.describe Branches::CreateService do subject(:service) { described_class.new(project, user) } let_it_be(:project) { create(:project_empty_repo) } diff --git a/spec/services/branches/delete_merged_service_spec.rb b/spec/services/branches/delete_merged_service_spec.rb index 5c87f156ec7..2cf0f53c8c3 100644 --- a/spec/services/branches/delete_merged_service_spec.rb +++ b/spec/services/branches/delete_merged_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Branches::DeleteMergedService do +RSpec.describe Branches::DeleteMergedService do include ProjectForksHelper subject(:service) { described_class.new(project, project.owner) } diff --git a/spec/services/branches/delete_service_spec.rb b/spec/services/branches/delete_service_spec.rb index 2219416d94d..b57817e9f59 100644 --- a/spec/services/branches/delete_service_spec.rb +++ b/spec/services/branches/delete_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Branches::DeleteService do +RSpec.describe Branches::DeleteService do let(:project) { create(:project, :repository) } let(:repository) { project.repository } let(:user) { create(:user) } diff --git a/spec/services/branches/diverging_commit_counts_service_spec.rb b/spec/services/branches/diverging_commit_counts_service_spec.rb index 370da773ab2..34a2b81c831 100644 --- a/spec/services/branches/diverging_commit_counts_service_spec.rb +++ b/spec/services/branches/diverging_commit_counts_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Branches::DivergingCommitCountsService do +RSpec.describe Branches::DivergingCommitCountsService do let(:project) { create(:project, :repository) } let(:repository) { project.repository } diff --git a/spec/services/branches/validate_new_service_spec.rb b/spec/services/branches/validate_new_service_spec.rb index 6d5078d3ccb..02127c8c10d 100644 --- a/spec/services/branches/validate_new_service_spec.rb +++ b/spec/services/branches/validate_new_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Branches::ValidateNewService do +RSpec.describe Branches::ValidateNewService do let(:project) { create(:project, :repository) } subject(:service) { described_class.new(project) } diff --git a/spec/services/bulk_push_event_payload_service_spec.rb b/spec/services/bulk_push_event_payload_service_spec.rb index 661c3540aa0..381c735c003 100644 --- a/spec/services/bulk_push_event_payload_service_spec.rb +++ b/spec/services/bulk_push_event_payload_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BulkPushEventPayloadService do +RSpec.describe BulkPushEventPayloadService do let(:event) { create(:push_event) } let(:push_data) do diff --git a/spec/services/chat_names/authorize_user_service_spec.rb b/spec/services/chat_names/authorize_user_service_spec.rb index 7f32948daad..b0bb741564d 100644 --- a/spec/services/chat_names/authorize_user_service_spec.rb +++ b/spec/services/chat_names/authorize_user_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ChatNames::AuthorizeUserService do +RSpec.describe ChatNames::AuthorizeUserService do describe '#execute' do subject { described_class.new(service, params) } diff --git a/spec/services/chat_names/find_user_service_spec.rb b/spec/services/chat_names/find_user_service_spec.rb index 9d26f98cd56..a29b243ad2c 100644 --- a/spec/services/chat_names/find_user_service_spec.rb +++ b/spec/services/chat_names/find_user_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ChatNames::FindUserService, :clean_gitlab_redis_shared_state do +RSpec.describe ChatNames::FindUserService, :clean_gitlab_redis_shared_state do describe '#execute' do let(:service) { create(:service) } diff --git a/spec/services/ci/archive_trace_service_spec.rb b/spec/services/ci/archive_trace_service_spec.rb index ba94013b574..07ea314debc 100644 --- a/spec/services/ci/archive_trace_service_spec.rb +++ b/spec/services/ci/archive_trace_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::ArchiveTraceService, '#execute' do +RSpec.describe Ci::ArchiveTraceService, '#execute' do subject { described_class.new.execute(job, worker_name: ArchiveTraceWorker.name) } context 'when job is finished' do diff --git a/spec/services/ci/build_report_result_service_spec.rb b/spec/services/ci/build_report_result_service_spec.rb index dbdfc774314..3c1ef5301fc 100644 --- a/spec/services/ci/build_report_result_service_spec.rb +++ b/spec/services/ci/build_report_result_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::BuildReportResultService do +RSpec.describe Ci::BuildReportResultService do describe "#execute" do subject(:build_report_result) { described_class.new.execute(build) } diff --git a/spec/services/ci/cancel_user_pipelines_service_spec.rb b/spec/services/ci/cancel_user_pipelines_service_spec.rb index b18bf48a50a..12117051b64 100644 --- a/spec/services/ci/cancel_user_pipelines_service_spec.rb +++ b/spec/services/ci/cancel_user_pipelines_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CancelUserPipelinesService do +RSpec.describe Ci::CancelUserPipelinesService do describe '#execute' do let(:user) { create(:user) } diff --git a/spec/services/ci/compare_accessibility_reports_service_spec.rb b/spec/services/ci/compare_accessibility_reports_service_spec.rb index aee1fd14bc5..6903a633eeb 100644 --- a/spec/services/ci/compare_accessibility_reports_service_spec.rb +++ b/spec/services/ci/compare_accessibility_reports_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CompareAccessibilityReportsService do +RSpec.describe Ci::CompareAccessibilityReportsService do let(:service) { described_class.new(project) } let(:project) { create(:project, :repository) } diff --git a/spec/services/ci/compare_test_reports_service_spec.rb b/spec/services/ci/compare_test_reports_service_spec.rb index 46f4d2d42ff..7d31db73b6a 100644 --- a/spec/services/ci/compare_test_reports_service_spec.rb +++ b/spec/services/ci/compare_test_reports_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CompareTestReportsService do +RSpec.describe Ci::CompareTestReportsService do let(:service) { described_class.new(project) } let(:project) { create(:project, :repository) } diff --git a/spec/services/ci/create_cross_project_pipeline_service_spec.rb b/spec/services/ci/create_cross_project_pipeline_service_spec.rb index 9e2497854bc..1aabdb85afd 100644 --- a/spec/services/ci/create_cross_project_pipeline_service_spec.rb +++ b/spec/services/ci/create_cross_project_pipeline_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CreateCrossProjectPipelineService, '#execute' do +RSpec.describe Ci::CreateCrossProjectPipelineService, '#execute' do let_it_be(:user) { create(:user) } let(:upstream_project) { create(:project, :repository) } let_it_be(:downstream_project) { create(:project, :repository) } diff --git a/spec/services/ci/create_job_artifacts_service_spec.rb b/spec/services/ci/create_job_artifacts_service_spec.rb index 4d49923a184..e431cfd0117 100644 --- a/spec/services/ci/create_job_artifacts_service_spec.rb +++ b/spec/services/ci/create_job_artifacts_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CreateJobArtifactsService do +RSpec.describe Ci::CreateJobArtifactsService do let_it_be(:project) { create(:project) } let(:service) { described_class.new(project) } let(:job) { create(:ci_build, project: project) } diff --git a/spec/services/ci/create_pipeline_service/cache_spec.rb b/spec/services/ci/create_pipeline_service/cache_spec.rb index 4e0567132ff..614e46f1b1a 100644 --- a/spec/services/ci/create_pipeline_service/cache_spec.rb +++ b/spec/services/ci/create_pipeline_service/cache_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CreatePipelineService do +RSpec.describe Ci::CreatePipelineService do context 'cache' do let(:user) { create(:admin) } let(:ref) { 'refs/heads/master' } diff --git a/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb b/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb index 5980260a08a..122870e0f3a 100644 --- a/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb +++ b/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Ci::CreatePipelineService do +RSpec.describe Ci::CreatePipelineService do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:admin) } let(:ref) { 'refs/heads/master' } diff --git a/spec/services/ci/create_pipeline_service/needs_spec.rb b/spec/services/ci/create_pipeline_service/needs_spec.rb index 17b9cf80cc1..915dc46d664 100644 --- a/spec/services/ci/create_pipeline_service/needs_spec.rb +++ b/spec/services/ci/create_pipeline_service/needs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CreatePipelineService do +RSpec.describe Ci::CreatePipelineService do context 'needs' do let_it_be(:user) { create(:admin) } let_it_be(:project) { create(:project, :repository, creator: user) } diff --git a/spec/services/ci/create_pipeline_service/parent_child_pipeline_spec.rb b/spec/services/ci/create_pipeline_service/parent_child_pipeline_spec.rb index a76e83f2d60..016a5dfd18b 100644 --- a/spec/services/ci/create_pipeline_service/parent_child_pipeline_spec.rb +++ b/spec/services/ci/create_pipeline_service/parent_child_pipeline_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CreatePipelineService, '#execute' do +RSpec.describe Ci::CreatePipelineService, '#execute' do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:user) } let(:ref_name) { 'master' } diff --git a/spec/services/ci/create_pipeline_service/pre_post_stages_spec.rb b/spec/services/ci/create_pipeline_service/pre_post_stages_spec.rb index 2b11b98f58c..00a2dd74968 100644 --- a/spec/services/ci/create_pipeline_service/pre_post_stages_spec.rb +++ b/spec/services/ci/create_pipeline_service/pre_post_stages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Ci::CreatePipelineService do +RSpec.describe Ci::CreatePipelineService do describe '.pre/.post stages' do let_it_be(:user) { create(:admin) } let_it_be(:project) { create(:project, :repository, creator: user) } diff --git a/spec/services/ci/create_pipeline_service/rules_spec.rb b/spec/services/ci/create_pipeline_service/rules_spec.rb index 713d230731b..1a1fa6e8f5d 100644 --- a/spec/services/ci/create_pipeline_service/rules_spec.rb +++ b/spec/services/ci/create_pipeline_service/rules_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Ci::CreatePipelineService do +RSpec.describe Ci::CreatePipelineService do let(:user) { create(:admin) } let(:ref) { 'refs/heads/master' } let(:source) { :push } diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index b9456d5fcd4..1e8ee37bec4 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CreatePipelineService do +RSpec.describe Ci::CreatePipelineService do include ProjectForksHelper let_it_be(:project, reload: true) { create(:project, :repository) } diff --git a/spec/services/ci/create_web_ide_terminal_service_spec.rb b/spec/services/ci/create_web_ide_terminal_service_spec.rb index 2cc67c7cd1d..c1c94e30018 100644 --- a/spec/services/ci/create_web_ide_terminal_service_spec.rb +++ b/spec/services/ci/create_web_ide_terminal_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::CreateWebIdeTerminalService do +RSpec.describe Ci::CreateWebIdeTerminalService do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:user) } let(:ref) { 'master' } diff --git a/spec/services/ci/daily_build_group_report_result_service_spec.rb b/spec/services/ci/daily_build_group_report_result_service_spec.rb index f0b72b8fd86..7d181a5c2ba 100644 --- a/spec/services/ci/daily_build_group_report_result_service_spec.rb +++ b/spec/services/ci/daily_build_group_report_result_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::DailyBuildGroupReportResultService, '#execute' do +RSpec.describe Ci::DailyBuildGroupReportResultService, '#execute' do let!(:pipeline) { create(:ci_pipeline, created_at: '2020-02-06 00:01:10') } let!(:rspec_job) { create(:ci_build, pipeline: pipeline, name: '3/3 rspec', coverage: 80) } let!(:karma_job) { create(:ci_build, pipeline: pipeline, name: '2/2 karma', coverage: 90) } diff --git a/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb b/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb index 4b9f12d8fdf..1ec9e8df800 100644 --- a/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb +++ b/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::DestroyExpiredJobArtifactsService, :clean_gitlab_redis_shared_state do +RSpec.describe Ci::DestroyExpiredJobArtifactsService, :clean_gitlab_redis_shared_state do include ExclusiveLeaseHelpers describe '.execute' do diff --git a/spec/services/ci/destroy_pipeline_service_spec.rb b/spec/services/ci/destroy_pipeline_service_spec.rb index bff2b3179fb..23cbe683d2f 100644 --- a/spec/services/ci/destroy_pipeline_service_spec.rb +++ b/spec/services/ci/destroy_pipeline_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ::Ci::DestroyPipelineService do +RSpec.describe ::Ci::DestroyPipelineService do let(:project) { create(:project, :repository) } let!(:pipeline) { create(:ci_pipeline, :success, project: project, sha: project.commit.id) } diff --git a/spec/services/ci/ensure_stage_service_spec.rb b/spec/services/ci/ensure_stage_service_spec.rb index 8a270d77bae..3ede214cdd4 100644 --- a/spec/services/ci/ensure_stage_service_spec.rb +++ b/spec/services/ci/ensure_stage_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::EnsureStageService, '#execute' do +RSpec.describe Ci::EnsureStageService, '#execute' do let_it_be(:project) { create(:project) } let_it_be(:user) { create(:user) } diff --git a/spec/services/ci/expire_pipeline_cache_service_spec.rb b/spec/services/ci/expire_pipeline_cache_service_spec.rb index 2962e9dd31e..b5d664947de 100644 --- a/spec/services/ci/expire_pipeline_cache_service_spec.rb +++ b/spec/services/ci/expire_pipeline_cache_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::ExpirePipelineCacheService do +RSpec.describe Ci::ExpirePipelineCacheService do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:pipeline) { create(:ci_pipeline, project: project) } diff --git a/spec/services/ci/external_pull_requests/create_pipeline_service_spec.rb b/spec/services/ci/external_pull_requests/create_pipeline_service_spec.rb index 5048f2b71b3..e2bdfae27f0 100644 --- a/spec/services/ci/external_pull_requests/create_pipeline_service_spec.rb +++ b/spec/services/ci/external_pull_requests/create_pipeline_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::ExternalPullRequests::CreatePipelineService do +RSpec.describe Ci::ExternalPullRequests::CreatePipelineService do describe '#execute' do let_it_be(:project) { create(:project, :auto_devops, :repository) } let_it_be(:user) { create(:user) } diff --git a/spec/services/ci/extract_sections_from_build_trace_service_spec.rb b/spec/services/ci/extract_sections_from_build_trace_service_spec.rb index 03c67c611fe..c6ffcdcc6a8 100644 --- a/spec/services/ci/extract_sections_from_build_trace_service_spec.rb +++ b/spec/services/ci/extract_sections_from_build_trace_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::ExtractSectionsFromBuildTraceService, '#execute' do +RSpec.describe Ci::ExtractSectionsFromBuildTraceService, '#execute' do let(:user) { create(:user) } let(:project) { create(:project) } let(:build) { create(:ci_build, project: project) } diff --git a/spec/services/ci/find_exposed_artifacts_service_spec.rb b/spec/services/ci/find_exposed_artifacts_service_spec.rb index 16e23253c34..287f5c4b929 100644 --- a/spec/services/ci/find_exposed_artifacts_service_spec.rb +++ b/spec/services/ci/find_exposed_artifacts_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::FindExposedArtifactsService do +RSpec.describe Ci::FindExposedArtifactsService do include Gitlab::Routing let(:metadata) do diff --git a/spec/services/ci/generate_coverage_reports_service_spec.rb b/spec/services/ci/generate_coverage_reports_service_spec.rb index b64b682a00b..a3ed2eec713 100644 --- a/spec/services/ci/generate_coverage_reports_service_spec.rb +++ b/spec/services/ci/generate_coverage_reports_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::GenerateCoverageReportsService do +RSpec.describe Ci::GenerateCoverageReportsService do let(:service) { described_class.new(project) } let(:project) { create(:project, :repository) } diff --git a/spec/services/ci/generate_terraform_reports_service_spec.rb b/spec/services/ci/generate_terraform_reports_service_spec.rb index 21c0bac47a4..25bf96035b2 100644 --- a/spec/services/ci/generate_terraform_reports_service_spec.rb +++ b/spec/services/ci/generate_terraform_reports_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::GenerateTerraformReportsService do +RSpec.describe Ci::GenerateTerraformReportsService do let_it_be(:project) { create(:project, :repository) } describe '#execute' do diff --git a/spec/services/ci/parse_dotenv_artifact_service_spec.rb b/spec/services/ci/parse_dotenv_artifact_service_spec.rb index fc4131d262b..a5f01187a83 100644 --- a/spec/services/ci/parse_dotenv_artifact_service_spec.rb +++ b/spec/services/ci/parse_dotenv_artifact_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::ParseDotenvArtifactService do +RSpec.describe Ci::ParseDotenvArtifactService do let_it_be(:project) { create(:project) } let_it_be(:pipeline) { create(:ci_pipeline, project: project) } let(:build) { create(:ci_build, pipeline: pipeline, project: project) } diff --git a/spec/services/ci/pipeline_bridge_status_service_spec.rb b/spec/services/ci/pipeline_bridge_status_service_spec.rb index 7e79d222349..584b23bb3aa 100644 --- a/spec/services/ci/pipeline_bridge_status_service_spec.rb +++ b/spec/services/ci/pipeline_bridge_status_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelineBridgeStatusService do +RSpec.describe Ci::PipelineBridgeStatusService do let(:user) { build(:user) } let_it_be(:project) { create(:project) } let(:pipeline) { build(:ci_pipeline, project: project) } diff --git a/spec/services/ci/pipeline_processing/atomic_processing_service/status_collection_spec.rb b/spec/services/ci/pipeline_processing/atomic_processing_service/status_collection_spec.rb index de3c7713ac8..7868629d34d 100644 --- a/spec/services/ci/pipeline_processing/atomic_processing_service/status_collection_spec.rb +++ b/spec/services/ci/pipeline_processing/atomic_processing_service/status_collection_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelineProcessing::AtomicProcessingService::StatusCollection do +RSpec.describe Ci::PipelineProcessing::AtomicProcessingService::StatusCollection do using RSpec::Parameterized::TableSyntax let_it_be(:pipeline) { create(:ci_pipeline) } diff --git a/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb b/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb index 3b66ecff196..a10a333b462 100644 --- a/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb +++ b/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require_relative 'shared_processing_service.rb' require_relative 'shared_processing_service_tests_with_yaml.rb' -describe Ci::PipelineProcessing::AtomicProcessingService do +RSpec.describe Ci::PipelineProcessing::AtomicProcessingService do before do stub_feature_flags(ci_atomic_processing: true) diff --git a/spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb b/spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb index fd491bf461b..569a6d62dc1 100644 --- a/spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb +++ b/spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require_relative 'shared_processing_service.rb' require_relative 'shared_processing_service_tests_with_yaml.rb' -describe Ci::PipelineProcessing::LegacyProcessingService do +RSpec.describe Ci::PipelineProcessing::LegacyProcessingService do before do stub_feature_flags(ci_atomic_processing: false) end diff --git a/spec/services/ci/pipeline_processing/shared_processing_service.rb b/spec/services/ci/pipeline_processing/shared_processing_service.rb index 29fa43001ae..224066885b6 100644 --- a/spec/services/ci/pipeline_processing/shared_processing_service.rb +++ b/spec/services/ci/pipeline_processing/shared_processing_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples 'Pipeline Processing Service' do +RSpec.shared_examples 'Pipeline Processing Service' do let(:user) { create(:user) } let(:project) { create(:project) } diff --git a/spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb b/spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb index 93f83f0ea3b..17d254ba48e 100644 --- a/spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb +++ b/spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_context 'Pipeline Processing Service Tests With Yaml' do +RSpec.shared_context 'Pipeline Processing Service Tests With Yaml' do where(:test_file_path) do Dir.glob(Rails.root.join('spec/services/ci/pipeline_processing/test_cases/*.yml')) end diff --git a/spec/services/ci/pipeline_schedule_service_spec.rb b/spec/services/ci/pipeline_schedule_service_spec.rb index 867ed0acc0d..65bbd13c5e7 100644 --- a/spec/services/ci/pipeline_schedule_service_spec.rb +++ b/spec/services/ci/pipeline_schedule_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelineScheduleService do +RSpec.describe Ci::PipelineScheduleService do let(:project) { create(:project) } let(:user) { create(:user) } let(:service) { described_class.new(project, user) } diff --git a/spec/services/ci/pipeline_trigger_service_spec.rb b/spec/services/ci/pipeline_trigger_service_spec.rb index 44ce1ff699b..18fab9623ec 100644 --- a/spec/services/ci/pipeline_trigger_service_spec.rb +++ b/spec/services/ci/pipeline_trigger_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelineTriggerService do +RSpec.describe Ci::PipelineTriggerService do let(:project) { create(:project, :repository) } before do diff --git a/spec/services/ci/play_build_service_spec.rb b/spec/services/ci/play_build_service_spec.rb index cf39f3da4fe..c9ecbad3167 100644 --- a/spec/services/ci/play_build_service_spec.rb +++ b/spec/services/ci/play_build_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PlayBuildService, '#execute' do +RSpec.describe Ci::PlayBuildService, '#execute' do let(:user) { create(:user, developer_projects: [project]) } let(:project) { create(:project) } let(:pipeline) { create(:ci_pipeline, project: project) } diff --git a/spec/services/ci/play_manual_stage_service_spec.rb b/spec/services/ci/play_manual_stage_service_spec.rb index e2946111a13..e30ec8bfda5 100644 --- a/spec/services/ci/play_manual_stage_service_spec.rb +++ b/spec/services/ci/play_manual_stage_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PlayManualStageService, '#execute' do +RSpec.describe Ci::PlayManualStageService, '#execute' do let(:current_user) { create(:user) } let(:pipeline) { create(:ci_pipeline, user: current_user) } let(:project) { pipeline.project } diff --git a/spec/services/ci/prepare_build_service_spec.rb b/spec/services/ci/prepare_build_service_spec.rb index 02928b58ff8..f75cb322fe9 100644 --- a/spec/services/ci/prepare_build_service_spec.rb +++ b/spec/services/ci/prepare_build_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PrepareBuildService do +RSpec.describe Ci::PrepareBuildService do describe '#execute' do let(:build) { create(:ci_build, :preparing) } diff --git a/spec/services/ci/process_build_service_spec.rb b/spec/services/ci/process_build_service_spec.rb index abc5c18a523..a6e8732f5ff 100644 --- a/spec/services/ci/process_build_service_spec.rb +++ b/spec/services/ci/process_build_service_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Ci::ProcessBuildService, '#execute' do +RSpec.describe Ci::ProcessBuildService, '#execute' do let(:user) { create(:user) } let(:project) { create(:project) } diff --git a/spec/services/ci/process_pipeline_service_spec.rb b/spec/services/ci/process_pipeline_service_spec.rb index 40ae1c4029b..6ebb3188f00 100644 --- a/spec/services/ci/process_pipeline_service_spec.rb +++ b/spec/services/ci/process_pipeline_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::ProcessPipelineService do +RSpec.describe Ci::ProcessPipelineService do let(:user) { create(:user) } let(:project) { create(:project) } diff --git a/spec/services/ci/register_job_service_spec.rb b/spec/services/ci/register_job_service_spec.rb index c0f854df9b7..5727f3df857 100644 --- a/spec/services/ci/register_job_service_spec.rb +++ b/spec/services/ci/register_job_service_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' module Ci - describe RegisterJobService do + RSpec.describe RegisterJobService do let_it_be(:group) { create(:group) } let_it_be(:project, reload: true) { create(:project, group: group, shared_runners_enabled: false, group_runners_enabled: false) } let_it_be(:pipeline) { create(:ci_pipeline, project: project) } diff --git a/spec/services/ci/resource_groups/assign_resource_from_resource_group_service_spec.rb b/spec/services/ci/resource_groups/assign_resource_from_resource_group_service_spec.rb index 50d312647ae..6c69a7f3b11 100644 --- a/spec/services/ci/resource_groups/assign_resource_from_resource_group_service_spec.rb +++ b/spec/services/ci/resource_groups/assign_resource_from_resource_group_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::ResourceGroups::AssignResourceFromResourceGroupService do +RSpec.describe Ci::ResourceGroups::AssignResourceFromResourceGroupService do let_it_be(:project) { create(:project) } let_it_be(:user) { create(:user) } let(:service) { described_class.new(project, user) } diff --git a/spec/services/ci/retry_build_service_spec.rb b/spec/services/ci/retry_build_service_spec.rb index 90c53d4a346..93f64336cad 100644 --- a/spec/services/ci/retry_build_service_spec.rb +++ b/spec/services/ci/retry_build_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::RetryBuildService do +RSpec.describe Ci::RetryBuildService do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :repository) } let_it_be(:pipeline) do diff --git a/spec/services/ci/retry_pipeline_service_spec.rb b/spec/services/ci/retry_pipeline_service_spec.rb index 8e85e68d4fc..fa46d6c4d1d 100644 --- a/spec/services/ci/retry_pipeline_service_spec.rb +++ b/spec/services/ci/retry_pipeline_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::RetryPipelineService, '#execute' do +RSpec.describe Ci::RetryPipelineService, '#execute' do include ProjectForksHelper let(:user) { create(:user) } diff --git a/spec/services/ci/run_scheduled_build_service_spec.rb b/spec/services/ci/run_scheduled_build_service_spec.rb index 43d110cbc8f..27d25e88944 100644 --- a/spec/services/ci/run_scheduled_build_service_spec.rb +++ b/spec/services/ci/run_scheduled_build_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::RunScheduledBuildService do +RSpec.describe Ci::RunScheduledBuildService do let(:user) { create(:user) } let(:project) { create(:project) } let(:pipeline) { create(:ci_pipeline, project: project) } diff --git a/spec/services/ci/stop_environments_service_spec.rb b/spec/services/ci/stop_environments_service_spec.rb index ebbe6c37b87..5a0b7f23556 100644 --- a/spec/services/ci/stop_environments_service_spec.rb +++ b/spec/services/ci/stop_environments_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::StopEnvironmentsService do +RSpec.describe Ci::StopEnvironmentsService do include CreateEnvironmentsHelpers let(:project) { create(:project, :private, :repository) } diff --git a/spec/services/ci/update_build_queue_service_spec.rb b/spec/services/ci/update_build_queue_service_spec.rb index 522dd1ba1c2..0f4c0fa5ecb 100644 --- a/spec/services/ci/update_build_queue_service_spec.rb +++ b/spec/services/ci/update_build_queue_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::UpdateBuildQueueService do +RSpec.describe Ci::UpdateBuildQueueService do let(:project) { create(:project, :repository) } let(:build) { create(:ci_build, pipeline: pipeline) } let(:pipeline) { create(:ci_pipeline, project: project) } diff --git a/spec/services/ci/update_instance_variables_service_spec.rb b/spec/services/ci/update_instance_variables_service_spec.rb index 93f6e5d3ea8..f235d006e34 100644 --- a/spec/services/ci/update_instance_variables_service_spec.rb +++ b/spec/services/ci/update_instance_variables_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::UpdateInstanceVariablesService do +RSpec.describe Ci::UpdateInstanceVariablesService do let(:params) { { variables_attributes: variables_attributes } } subject { described_class.new(params) } diff --git a/spec/services/ci/update_runner_service_spec.rb b/spec/services/ci/update_runner_service_spec.rb index abe575eebc8..cad9e893335 100644 --- a/spec/services/ci/update_runner_service_spec.rb +++ b/spec/services/ci/update_runner_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::UpdateRunnerService do +RSpec.describe Ci::UpdateRunnerService do let(:runner) { create(:ci_runner) } describe '#update' do diff --git a/spec/services/ci/web_ide_config_service_spec.rb b/spec/services/ci/web_ide_config_service_spec.rb index 7522103ccb7..437b468cec8 100644 --- a/spec/services/ci/web_ide_config_service_spec.rb +++ b/spec/services/ci/web_ide_config_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::WebIdeConfigService do +RSpec.describe Ci::WebIdeConfigService do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:user) } let(:sha) { 'sha' } diff --git a/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb b/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb index 84bca76e69b..605d9e67ab6 100644 --- a/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb +++ b/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::CheckIngressIpAddressService do +RSpec.describe Clusters::Applications::CheckIngressIpAddressService do include ExclusiveLeaseHelpers let(:application) { create(:clusters_applications_ingress, :installed) } diff --git a/spec/services/clusters/applications/check_installation_progress_service_spec.rb b/spec/services/clusters/applications/check_installation_progress_service_spec.rb index 4b8db405101..13f7cd62002 100644 --- a/spec/services/clusters/applications/check_installation_progress_service_spec.rb +++ b/spec/services/clusters/applications/check_installation_progress_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::CheckInstallationProgressService, '#execute' do +RSpec.describe Clusters::Applications::CheckInstallationProgressService, '#execute' do RESCHEDULE_PHASES = Gitlab::Kubernetes::Pod::PHASES - [Gitlab::Kubernetes::Pod::SUCCEEDED, Gitlab::Kubernetes::Pod::FAILED].freeze let(:application) { create(:clusters_applications_helm, :installing) } diff --git a/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb b/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb index 9dede1947f8..4b8893429cf 100644 --- a/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb +++ b/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::CheckUninstallProgressService do +RSpec.describe Clusters::Applications::CheckUninstallProgressService do reschedule_phases = Gitlab::Kubernetes::Pod::PHASES - [Gitlab::Kubernetes::Pod::SUCCEEDED, Gitlab::Kubernetes::Pod::FAILED].freeze let(:application) { create(:clusters_applications_prometheus, :uninstalling) } diff --git a/spec/services/clusters/applications/check_upgrade_progress_service_spec.rb b/spec/services/clusters/applications/check_upgrade_progress_service_spec.rb index 29ee897454a..dbde8cec9b9 100644 --- a/spec/services/clusters/applications/check_upgrade_progress_service_spec.rb +++ b/spec/services/clusters/applications/check_upgrade_progress_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::CheckUpgradeProgressService do +RSpec.describe Clusters::Applications::CheckUpgradeProgressService do reschedule_phashes = ::Gitlab::Kubernetes::Pod::PHASES - [::Gitlab::Kubernetes::Pod::SUCCEEDED, ::Gitlab::Kubernetes::Pod::FAILED, ::Gitlab].freeze diff --git a/spec/services/clusters/applications/create_service_spec.rb b/spec/services/clusters/applications/create_service_spec.rb index 0b48af408e1..f93ae2c62f3 100644 --- a/spec/services/clusters/applications/create_service_spec.rb +++ b/spec/services/clusters/applications/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::CreateService do +RSpec.describe Clusters::Applications::CreateService do include TestRequestHelpers let(:cluster) { create(:cluster, :project, :provided_by_gcp) } diff --git a/spec/services/clusters/applications/destroy_service_spec.rb b/spec/services/clusters/applications/destroy_service_spec.rb index 8d9dc6a0f11..7306256e68e 100644 --- a/spec/services/clusters/applications/destroy_service_spec.rb +++ b/spec/services/clusters/applications/destroy_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::DestroyService, '#execute' do +RSpec.describe Clusters::Applications::DestroyService, '#execute' do let(:cluster) { create(:cluster, :project, :provided_by_gcp) } let(:user) { create(:user) } let(:params) { { application: 'prometheus' } } diff --git a/spec/services/clusters/applications/install_service_spec.rb b/spec/services/clusters/applications/install_service_spec.rb index 2441cc595a3..d34b4dd943c 100644 --- a/spec/services/clusters/applications/install_service_spec.rb +++ b/spec/services/clusters/applications/install_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::InstallService do +RSpec.describe Clusters::Applications::InstallService do describe '#execute' do let(:application) { create(:clusters_applications_helm, :scheduled) } let!(:install_command) { application.install_command } diff --git a/spec/services/clusters/applications/patch_service_spec.rb b/spec/services/clusters/applications/patch_service_spec.rb index dc9843a5116..281da62b80b 100644 --- a/spec/services/clusters/applications/patch_service_spec.rb +++ b/spec/services/clusters/applications/patch_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::PatchService do +RSpec.describe Clusters::Applications::PatchService do describe '#execute' do let(:application) { create(:clusters_applications_knative, :scheduled) } let!(:update_command) { application.update_command } diff --git a/spec/services/clusters/applications/prometheus_config_service_spec.rb b/spec/services/clusters/applications/prometheus_config_service_spec.rb index b9032e665ec..7399f250248 100644 --- a/spec/services/clusters/applications/prometheus_config_service_spec.rb +++ b/spec/services/clusters/applications/prometheus_config_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::PrometheusConfigService do +RSpec.describe Clusters::Applications::PrometheusConfigService do include Gitlab::Routing.url_helpers let_it_be(:project) { create(:project) } diff --git a/spec/services/clusters/applications/prometheus_health_check_service_spec.rb b/spec/services/clusters/applications/prometheus_health_check_service_spec.rb index 5c4127e4938..fc5a80688e6 100644 --- a/spec/services/clusters/applications/prometheus_health_check_service_spec.rb +++ b/spec/services/clusters/applications/prometheus_health_check_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::PrometheusHealthCheckService, '#execute' do +RSpec.describe Clusters::Applications::PrometheusHealthCheckService, '#execute' do let(:service) { described_class.new(cluster) } subject { service.execute } diff --git a/spec/services/clusters/applications/prometheus_update_service_spec.rb b/spec/services/clusters/applications/prometheus_update_service_spec.rb index 078b01d2777..076ff0210c9 100644 --- a/spec/services/clusters/applications/prometheus_update_service_spec.rb +++ b/spec/services/clusters/applications/prometheus_update_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::PrometheusUpdateService do +RSpec.describe Clusters::Applications::PrometheusUpdateService do describe '#execute' do let(:project) { create(:project) } let(:environment) { create(:environment, project: project) } diff --git a/spec/services/clusters/applications/schedule_update_service_spec.rb b/spec/services/clusters/applications/schedule_update_service_spec.rb index eb1006ce8e0..f559fb1b7aa 100644 --- a/spec/services/clusters/applications/schedule_update_service_spec.rb +++ b/spec/services/clusters/applications/schedule_update_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::ScheduleUpdateService do +RSpec.describe Clusters::Applications::ScheduleUpdateService do describe '#execute' do let(:project) { create(:project) } diff --git a/spec/services/clusters/applications/uninstall_service_spec.rb b/spec/services/clusters/applications/uninstall_service_spec.rb index 6d7f0478b20..50d7e82c47e 100644 --- a/spec/services/clusters/applications/uninstall_service_spec.rb +++ b/spec/services/clusters/applications/uninstall_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::UninstallService, '#execute' do +RSpec.describe Clusters::Applications::UninstallService, '#execute' do let(:application) { create(:clusters_applications_prometheus, :scheduled) } let(:service) { described_class.new(application) } let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::API) } diff --git a/spec/services/clusters/applications/update_service_spec.rb b/spec/services/clusters/applications/update_service_spec.rb index 4676951faff..4c05a12a4a1 100644 --- a/spec/services/clusters/applications/update_service_spec.rb +++ b/spec/services/clusters/applications/update_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::UpdateService do +RSpec.describe Clusters::Applications::UpdateService do include TestRequestHelpers let(:cluster) { create(:cluster, :project, :provided_by_gcp) } diff --git a/spec/services/clusters/applications/upgrade_service_spec.rb b/spec/services/clusters/applications/upgrade_service_spec.rb index 86fb06375f1..22fbb7ca6e3 100644 --- a/spec/services/clusters/applications/upgrade_service_spec.rb +++ b/spec/services/clusters/applications/upgrade_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::UpgradeService do +RSpec.describe Clusters::Applications::UpgradeService do describe '#execute' do let(:application) { create(:clusters_applications_helm, :scheduled) } let!(:install_command) { application.install_command } diff --git a/spec/services/clusters/aws/authorize_role_service_spec.rb b/spec/services/clusters/aws/authorize_role_service_spec.rb index 3ef332558a2..530268340b7 100644 --- a/spec/services/clusters/aws/authorize_role_service_spec.rb +++ b/spec/services/clusters/aws/authorize_role_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Aws::AuthorizeRoleService do +RSpec.describe Clusters::Aws::AuthorizeRoleService do let(:user) { create(:user) } let(:credentials) { instance_double(Aws::Credentials) } let(:credentials_service) { instance_double(Clusters::Aws::FetchCredentialsService, execute: credentials) } diff --git a/spec/services/clusters/aws/fetch_credentials_service_spec.rb b/spec/services/clusters/aws/fetch_credentials_service_spec.rb index 9194947c67f..a0e63d96a5c 100644 --- a/spec/services/clusters/aws/fetch_credentials_service_spec.rb +++ b/spec/services/clusters/aws/fetch_credentials_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Aws::FetchCredentialsService do +RSpec.describe Clusters::Aws::FetchCredentialsService do describe '#execute' do let(:user) { create(:user) } let(:provider) { create(:cluster_provider_aws, region: 'ap-southeast-2') } diff --git a/spec/services/clusters/aws/finalize_creation_service_spec.rb b/spec/services/clusters/aws/finalize_creation_service_spec.rb index 8d7341483e3..6b0cb86eff0 100644 --- a/spec/services/clusters/aws/finalize_creation_service_spec.rb +++ b/spec/services/clusters/aws/finalize_creation_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Aws::FinalizeCreationService do +RSpec.describe Clusters::Aws::FinalizeCreationService do describe '#execute' do let(:provider) { create(:cluster_provider_aws, :creating) } let(:platform) { provider.cluster.platform_kubernetes } diff --git a/spec/services/clusters/aws/provision_service_spec.rb b/spec/services/clusters/aws/provision_service_spec.rb index 15571c64e13..529e1d26575 100644 --- a/spec/services/clusters/aws/provision_service_spec.rb +++ b/spec/services/clusters/aws/provision_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Aws::ProvisionService do +RSpec.describe Clusters::Aws::ProvisionService do describe '#execute' do let(:provider) { create(:cluster_provider_aws) } diff --git a/spec/services/clusters/aws/verify_provision_status_service_spec.rb b/spec/services/clusters/aws/verify_provision_status_service_spec.rb index b62b0875bf3..b9a58b97842 100644 --- a/spec/services/clusters/aws/verify_provision_status_service_spec.rb +++ b/spec/services/clusters/aws/verify_provision_status_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Aws::VerifyProvisionStatusService do +RSpec.describe Clusters::Aws::VerifyProvisionStatusService do describe '#execute' do let(:provider) { create(:cluster_provider_aws) } diff --git a/spec/services/clusters/build_kubernetes_namespace_service_spec.rb b/spec/services/clusters/build_kubernetes_namespace_service_spec.rb index 36c05469542..4ee933374f6 100644 --- a/spec/services/clusters/build_kubernetes_namespace_service_spec.rb +++ b/spec/services/clusters/build_kubernetes_namespace_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::BuildKubernetesNamespaceService do +RSpec.describe Clusters::BuildKubernetesNamespaceService do let(:cluster) { create(:cluster, :project, :provided_by_gcp) } let(:environment) { create(:environment) } let(:project) { environment.project } diff --git a/spec/services/clusters/build_service_spec.rb b/spec/services/clusters/build_service_spec.rb index f3e852726f4..c7a64435d3b 100644 --- a/spec/services/clusters/build_service_spec.rb +++ b/spec/services/clusters/build_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::BuildService do +RSpec.describe Clusters::BuildService do describe '#execute' do subject { described_class.new(cluster_subject).execute } diff --git a/spec/services/clusters/cleanup/app_service_spec.rb b/spec/services/clusters/cleanup/app_service_spec.rb index 14bfca02fee..ba1be7448a4 100644 --- a/spec/services/clusters/cleanup/app_service_spec.rb +++ b/spec/services/clusters/cleanup/app_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Cleanup::AppService do +RSpec.describe Clusters::Cleanup::AppService do describe '#execute' do let!(:cluster) { create(:cluster, :project, :cleanup_uninstalling_applications, provider_type: :gcp) } let(:service) { described_class.new(cluster) } diff --git a/spec/services/clusters/cleanup/project_namespace_service_spec.rb b/spec/services/clusters/cleanup/project_namespace_service_spec.rb index 22e29cc57d1..761ad8dd8c8 100644 --- a/spec/services/clusters/cleanup/project_namespace_service_spec.rb +++ b/spec/services/clusters/cleanup/project_namespace_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Cleanup::ProjectNamespaceService do +RSpec.describe Clusters::Cleanup::ProjectNamespaceService do describe '#execute' do subject { service.execute } diff --git a/spec/services/clusters/cleanup/service_account_service_spec.rb b/spec/services/clusters/cleanup/service_account_service_spec.rb index ecaf0da9fa3..6fe3d0c286e 100644 --- a/spec/services/clusters/cleanup/service_account_service_spec.rb +++ b/spec/services/clusters/cleanup/service_account_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Cleanup::ServiceAccountService do +RSpec.describe Clusters::Cleanup::ServiceAccountService do describe '#execute' do subject { service.execute } diff --git a/spec/services/clusters/create_service_spec.rb b/spec/services/clusters/create_service_spec.rb index 3dd25be2a3d..d45749b52d0 100644 --- a/spec/services/clusters/create_service_spec.rb +++ b/spec/services/clusters/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::CreateService do +RSpec.describe Clusters::CreateService do let(:access_token) { 'xxx' } let(:project) { create(:project) } let(:user) { create(:user) } diff --git a/spec/services/clusters/destroy_service_spec.rb b/spec/services/clusters/destroy_service_spec.rb index 43ebf8f499e..76d9cc34b5d 100644 --- a/spec/services/clusters/destroy_service_spec.rb +++ b/spec/services/clusters/destroy_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::DestroyService do +RSpec.describe Clusters::DestroyService do describe '#execute' do subject { described_class.new(cluster.user, params).execute(cluster) } diff --git a/spec/services/clusters/gcp/fetch_operation_service_spec.rb b/spec/services/clusters/gcp/fetch_operation_service_spec.rb index 23da8004a7d..990cc745382 100644 --- a/spec/services/clusters/gcp/fetch_operation_service_spec.rb +++ b/spec/services/clusters/gcp/fetch_operation_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Gcp::FetchOperationService do +RSpec.describe Clusters::Gcp::FetchOperationService do include GoogleApi::CloudPlatformHelpers describe '#execute' do diff --git a/spec/services/clusters/gcp/finalize_creation_service_spec.rb b/spec/services/clusters/gcp/finalize_creation_service_spec.rb index 4d1548c9786..be362dc6e23 100644 --- a/spec/services/clusters/gcp/finalize_creation_service_spec.rb +++ b/spec/services/clusters/gcp/finalize_creation_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Gcp::FinalizeCreationService, '#execute' do +RSpec.describe Clusters::Gcp::FinalizeCreationService, '#execute' do include GoogleApi::CloudPlatformHelpers include KubernetesHelpers diff --git a/spec/services/clusters/gcp/provision_service_spec.rb b/spec/services/clusters/gcp/provision_service_spec.rb index dfd15690a1f..c5778db6001 100644 --- a/spec/services/clusters/gcp/provision_service_spec.rb +++ b/spec/services/clusters/gcp/provision_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Gcp::ProvisionService do +RSpec.describe Clusters::Gcp::ProvisionService do include GoogleApi::CloudPlatformHelpers describe '#execute' do diff --git a/spec/services/clusters/gcp/verify_provision_status_service_spec.rb b/spec/services/clusters/gcp/verify_provision_status_service_spec.rb index 584f9b8367f..ccb4b3b6c15 100644 --- a/spec/services/clusters/gcp/verify_provision_status_service_spec.rb +++ b/spec/services/clusters/gcp/verify_provision_status_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Gcp::VerifyProvisionStatusService do +RSpec.describe Clusters::Gcp::VerifyProvisionStatusService do include GoogleApi::CloudPlatformHelpers describe '#execute' do diff --git a/spec/services/clusters/kubernetes/configure_istio_ingress_service_spec.rb b/spec/services/clusters/kubernetes/configure_istio_ingress_service_spec.rb index e9f7f015293..b4402aadc88 100644 --- a/spec/services/clusters/kubernetes/configure_istio_ingress_service_spec.rb +++ b/spec/services/clusters/kubernetes/configure_istio_ingress_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Kubernetes::ConfigureIstioIngressService, '#execute' do +RSpec.describe Clusters::Kubernetes::ConfigureIstioIngressService, '#execute' do include KubernetesHelpers let(:cluster) { create(:cluster, :project, :provided_by_gcp) } diff --git a/spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb b/spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb index 6d8b1617c17..ee10c59390e 100644 --- a/spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb +++ b/spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Kubernetes::CreateOrUpdateNamespaceService, '#execute' do +RSpec.describe Clusters::Kubernetes::CreateOrUpdateNamespaceService, '#execute' do include KubernetesHelpers let(:cluster) { create(:cluster, :project, :provided_by_gcp) } diff --git a/spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb b/spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb index 4bcd5c6933e..f3fa6c2c0bb 100644 --- a/spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb +++ b/spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Clusters::Kubernetes::CreateOrUpdateServiceAccountService do +RSpec.describe Clusters::Kubernetes::CreateOrUpdateServiceAccountService do include KubernetesHelpers let(:api_url) { 'http://111.111.111.111' } diff --git a/spec/services/clusters/kubernetes/fetch_kubernetes_token_service_spec.rb b/spec/services/clusters/kubernetes/fetch_kubernetes_token_service_spec.rb index fa4b6e497e5..c4daae9dbf0 100644 --- a/spec/services/clusters/kubernetes/fetch_kubernetes_token_service_spec.rb +++ b/spec/services/clusters/kubernetes/fetch_kubernetes_token_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Kubernetes::FetchKubernetesTokenService do +RSpec.describe Clusters::Kubernetes::FetchKubernetesTokenService do include KubernetesHelpers describe '#execute' do diff --git a/spec/services/clusters/kubernetes_spec.rb b/spec/services/clusters/kubernetes_spec.rb index 09cc304debe..12af63890fc 100644 --- a/spec/services/clusters/kubernetes_spec.rb +++ b/spec/services/clusters/kubernetes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Kubernetes do +RSpec.describe Clusters::Kubernetes do it { is_expected.to be_const_defined(:GITLAB_SERVICE_ACCOUNT_NAME) } it { is_expected.to be_const_defined(:GITLAB_SERVICE_ACCOUNT_NAMESPACE) } it { is_expected.to be_const_defined(:GITLAB_ADMIN_TOKEN_NAME) } diff --git a/spec/services/clusters/management/create_project_service_spec.rb b/spec/services/clusters/management/create_project_service_spec.rb index b7764b7840c..5d8cc71faa4 100644 --- a/spec/services/clusters/management/create_project_service_spec.rb +++ b/spec/services/clusters/management/create_project_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Management::CreateProjectService do +RSpec.describe Clusters::Management::CreateProjectService do let(:cluster) { create(:cluster, :project) } let(:current_user) { create(:user) } diff --git a/spec/services/clusters/management/validate_management_project_permissions_service_spec.rb b/spec/services/clusters/management/validate_management_project_permissions_service_spec.rb index 1bcebe2e2ac..a21c378d3d1 100644 --- a/spec/services/clusters/management/validate_management_project_permissions_service_spec.rb +++ b/spec/services/clusters/management/validate_management_project_permissions_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Management::ValidateManagementProjectPermissionsService do +RSpec.describe Clusters::Management::ValidateManagementProjectPermissionsService do describe '#execute' do subject { described_class.new(user).execute(cluster, management_project_id) } diff --git a/spec/services/clusters/parse_cluster_applications_artifact_service_spec.rb b/spec/services/clusters/parse_cluster_applications_artifact_service_spec.rb index bb0b107eba6..f13aa73554e 100644 --- a/spec/services/clusters/parse_cluster_applications_artifact_service_spec.rb +++ b/spec/services/clusters/parse_cluster_applications_artifact_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::ParseClusterApplicationsArtifactService do +RSpec.describe Clusters::ParseClusterApplicationsArtifactService do let_it_be(:project) { create(:project) } let_it_be(:user) { create(:user) } diff --git a/spec/services/clusters/update_service_spec.rb b/spec/services/clusters/update_service_spec.rb index 5a7726eded8..e496ccd5c23 100644 --- a/spec/services/clusters/update_service_spec.rb +++ b/spec/services/clusters/update_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::UpdateService do +RSpec.describe Clusters::UpdateService do include KubernetesHelpers describe '#execute' do diff --git a/spec/services/cohorts_service_spec.rb b/spec/services/cohorts_service_spec.rb index b2f82a1153c..dce8d4f80f2 100644 --- a/spec/services/cohorts_service_spec.rb +++ b/spec/services/cohorts_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe CohortsService do +RSpec.describe CohortsService do describe '#execute' do def month_start(months_ago) months_ago.months.ago.beginning_of_month.to_date diff --git a/spec/services/commits/cherry_pick_service_spec.rb b/spec/services/commits/cherry_pick_service_spec.rb index 3b797b8ac02..8fad5164b77 100644 --- a/spec/services/commits/cherry_pick_service_spec.rb +++ b/spec/services/commits/cherry_pick_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Commits::CherryPickService do +RSpec.describe Commits::CherryPickService do let(:project) { create(:project, :repository) } # * ddd0f15ae83993f5cb66a927a28673882e99100b (HEAD -> master, origin/master, origin/HEAD) Merge branch 'po-fix-test-en # |\ diff --git a/spec/services/commits/commit_patch_service_spec.rb b/spec/services/commits/commit_patch_service_spec.rb index f4fcec2fbc2..c8c0cbe23b2 100644 --- a/spec/services/commits/commit_patch_service_spec.rb +++ b/spec/services/commits/commit_patch_service_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Commits::CommitPatchService do +RSpec.describe Commits::CommitPatchService do describe '#execute' do let(:patches) do patches_folder = Rails.root.join('spec/fixtures/patchfiles') diff --git a/spec/services/commits/tag_service_spec.rb b/spec/services/commits/tag_service_spec.rb index 82377a8dace..dd742ebe469 100644 --- a/spec/services/commits/tag_service_spec.rb +++ b/spec/services/commits/tag_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Commits::TagService do +RSpec.describe Commits::TagService do let(:project) { create(:project, :repository) } let(:user) { create(:user) } diff --git a/spec/services/compare_service_spec.rb b/spec/services/compare_service_spec.rb index f6d8eb348d0..e96a7f2f4f4 100644 --- a/spec/services/compare_service_spec.rb +++ b/spec/services/compare_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe CompareService do +RSpec.describe CompareService do let(:project) { create(:project, :repository) } let(:user) { create(:user) } let(:service) { described_class.new(project, 'feature') } diff --git a/spec/services/concerns/merge_requests/assigns_merge_params_spec.rb b/spec/services/concerns/merge_requests/assigns_merge_params_spec.rb index 9cf7f354191..5b1e8fca31b 100644 --- a/spec/services/concerns/merge_requests/assigns_merge_params_spec.rb +++ b/spec/services/concerns/merge_requests/assigns_merge_params_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequests::AssignsMergeParams do +RSpec.describe MergeRequests::AssignsMergeParams do it 'raises an error when used from an instance that does not respond to #current_user' do define_class = -> { Class.new { include MergeRequests::AssignsMergeParams }.new } diff --git a/spec/services/container_expiration_policy_service_spec.rb b/spec/services/container_expiration_policy_service_spec.rb index 97715b990ef..dfce51d73ad 100644 --- a/spec/services/container_expiration_policy_service_spec.rb +++ b/spec/services/container_expiration_policy_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ContainerExpirationPolicyService do +RSpec.describe ContainerExpirationPolicyService do let_it_be(:user) { create(:user) } let_it_be(:container_expiration_policy) { create(:container_expiration_policy, :runnable) } let(:project) { container_expiration_policy.project } diff --git a/spec/services/deploy_keys/create_service_spec.rb b/spec/services/deploy_keys/create_service_spec.rb index a55f1561194..2e3318236f5 100644 --- a/spec/services/deploy_keys/create_service_spec.rb +++ b/spec/services/deploy_keys/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DeployKeys::CreateService do +RSpec.describe DeployKeys::CreateService do let(:user) { create(:user) } let(:params) { attributes_for(:deploy_key) } diff --git a/spec/services/deployments/after_create_service_spec.rb b/spec/services/deployments/after_create_service_spec.rb index 5a69ffd8b9c..3287eed03b7 100644 --- a/spec/services/deployments/after_create_service_spec.rb +++ b/spec/services/deployments/after_create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Deployments::AfterCreateService do +RSpec.describe Deployments::AfterCreateService do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:options) { { name: 'production' } } diff --git a/spec/services/deployments/create_service_spec.rb b/spec/services/deployments/create_service_spec.rb index 6ab1f8635f7..d1f977c28d3 100644 --- a/spec/services/deployments/create_service_spec.rb +++ b/spec/services/deployments/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Deployments::CreateService do +RSpec.describe Deployments::CreateService do let(:user) { create(:user) } describe '#execute' do diff --git a/spec/services/deployments/link_merge_requests_service_spec.rb b/spec/services/deployments/link_merge_requests_service_spec.rb index aa2cecbf897..e2ac2273b8c 100644 --- a/spec/services/deployments/link_merge_requests_service_spec.rb +++ b/spec/services/deployments/link_merge_requests_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Deployments::LinkMergeRequestsService do +RSpec.describe Deployments::LinkMergeRequestsService do let(:project) { create(:project, :repository) } # * ddd0f15 Merge branch 'po-fix-test-env-path' into 'master' diff --git a/spec/services/deployments/older_deployments_drop_service_spec.rb b/spec/services/deployments/older_deployments_drop_service_spec.rb index 4c9bcf90533..6152a95cc3c 100644 --- a/spec/services/deployments/older_deployments_drop_service_spec.rb +++ b/spec/services/deployments/older_deployments_drop_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Deployments::OlderDeploymentsDropService do +RSpec.describe Deployments::OlderDeploymentsDropService do let(:environment) { create(:environment) } let(:deployment) { create(:deployment, environment: environment) } let(:service) { described_class.new(deployment) } diff --git a/spec/services/deployments/update_service_spec.rb b/spec/services/deployments/update_service_spec.rb index 471e90de467..16b24d0dee8 100644 --- a/spec/services/deployments/update_service_spec.rb +++ b/spec/services/deployments/update_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Deployments::UpdateService do +RSpec.describe Deployments::UpdateService do let(:deploy) { create(:deployment) } describe '#execute' do diff --git a/spec/services/design_management/delete_designs_service_spec.rb b/spec/services/design_management/delete_designs_service_spec.rb index bf5d6b443e6..ace63b6e59c 100644 --- a/spec/services/design_management/delete_designs_service_spec.rb +++ b/spec/services/design_management/delete_designs_service_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe DesignManagement::DeleteDesignsService do +RSpec.describe DesignManagement::DeleteDesignsService do include DesignManagementTestHelpers let_it_be(:project) { create(:project) } diff --git a/spec/services/design_management/design_user_notes_count_service_spec.rb b/spec/services/design_management/design_user_notes_count_service_spec.rb index 62211a4dd0f..37806d3461c 100644 --- a/spec/services/design_management/design_user_notes_count_service_spec.rb +++ b/spec/services/design_management/design_user_notes_count_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DesignManagement::DesignUserNotesCountService, :use_clean_rails_memory_store_caching do +RSpec.describe DesignManagement::DesignUserNotesCountService, :use_clean_rails_memory_store_caching do let_it_be(:design) { create(:design, :with_file) } subject { described_class.new(design) } diff --git a/spec/workers/cluster_update_app_worker_spec.rb b/spec/workers/cluster_update_app_worker_spec.rb index 5391c194679..848d2ab4eac 100644 --- a/spec/workers/cluster_update_app_worker_spec.rb +++ b/spec/workers/cluster_update_app_worker_spec.rb @@ -12,7 +12,7 @@ describe ClusterUpdateAppWorker do subject { described_class.new } around do |example| - Timecop.freeze(Time.now) { example.run } + Timecop.freeze(Time.current) { example.run } end before do @@ -22,11 +22,11 @@ describe ClusterUpdateAppWorker do describe '#perform' do context 'when the application last_update_started_at is higher than the time the job was scheduled in' do it 'does nothing' do - application = create(:clusters_applications_prometheus, :updated, last_update_started_at: Time.now) + application = create(:clusters_applications_prometheus, :updated, last_update_started_at: Time.current) expect(prometheus_update_service).not_to receive(:execute) - expect(subject.perform(application.name, application.id, project.id, Time.now - 5.minutes)).to be_nil + expect(subject.perform(application.name, application.id, project.id, Time.current - 5.minutes)).to be_nil end end @@ -34,7 +34,7 @@ describe ClusterUpdateAppWorker do it 'returns nil' do application = create(:clusters_applications_prometheus, :updating) - expect(subject.perform(application.name, application.id, project.id, Time.now)).to be_nil + expect(subject.perform(application.name, application.id, project.id, Time.current)).to be_nil end end @@ -43,7 +43,7 @@ describe ClusterUpdateAppWorker do expect(prometheus_update_service).to receive(:execute) - subject.perform(application.name, application.id, project.id, Time.now) + subject.perform(application.name, application.id, project.id, Time.current) end context 'with exclusive lease' do @@ -60,7 +60,7 @@ describe ClusterUpdateAppWorker do it 'does not allow same app to be updated concurrently by same project' do expect(Clusters::Applications::PrometheusUpdateService).not_to receive(:new) - subject.perform(application.name, application.id, project.id, Time.now) + subject.perform(application.name, application.id, project.id, Time.current) end it 'does not allow same app to be updated concurrently by different project', :aggregate_failures do @@ -68,7 +68,7 @@ describe ClusterUpdateAppWorker do expect(Clusters::Applications::PrometheusUpdateService).not_to receive(:new) - subject.perform(application.name, application.id, project1.id, Time.now) + subject.perform(application.name, application.id, project1.id, Time.current) end it 'allows different app to be updated concurrently by same project' do @@ -80,7 +80,7 @@ describe ClusterUpdateAppWorker do expect(Clusters::Applications::PrometheusUpdateService).to receive(:new) .with(application2, project) - subject.perform(application2.name, application2.id, project.id, Time.now) + subject.perform(application2.name, application2.id, project.id, Time.current) end it 'allows different app to be updated by different project', :aggregate_failures do @@ -94,7 +94,7 @@ describe ClusterUpdateAppWorker do expect(Clusters::Applications::PrometheusUpdateService).to receive(:new) .with(application2, project2) - subject.perform(application2.name, application2.id, project2.id, Time.now) + subject.perform(application2.name, application2.id, project2.id, Time.current) end end end diff --git a/spec/workers/expire_build_instance_artifacts_worker_spec.rb b/spec/workers/expire_build_instance_artifacts_worker_spec.rb index 335fa5e6c98..136a04672a7 100644 --- a/spec/workers/expire_build_instance_artifacts_worker_spec.rb +++ b/spec/workers/expire_build_instance_artifacts_worker_spec.rb @@ -32,7 +32,7 @@ describe ExpireBuildInstanceArtifactsWorker do context 'with not yet expired artifacts' do let_it_be(:build) do - create(:ci_build, :artifacts, artifacts_expire_at: Time.now + 7.days) + create(:ci_build, :artifacts, artifacts_expire_at: Time.current + 7.days) end it 'does not expire' do diff --git a/spec/workers/pipeline_metrics_worker_spec.rb b/spec/workers/pipeline_metrics_worker_spec.rb index 6beecbcd114..e12cd0ea1e9 100644 --- a/spec/workers/pipeline_metrics_worker_spec.rb +++ b/spec/workers/pipeline_metrics_worker_spec.rb @@ -18,7 +18,7 @@ describe PipelineMetricsWorker do ref: 'master', sha: project.repository.commit('master').id, started_at: 1.hour.ago, - finished_at: Time.now) + finished_at: Time.current) end let(:status) { 'pending' } diff --git a/spec/workers/pipeline_schedule_worker_spec.rb b/spec/workers/pipeline_schedule_worker_spec.rb index 758cfa82d5d..ba52828b761 100644 --- a/spec/workers/pipeline_schedule_worker_spec.rb +++ b/spec/workers/pipeline_schedule_worker_spec.rb @@ -33,7 +33,7 @@ describe PipelineScheduleWorker do expect(Ci::Pipeline.last).to be_schedule pipeline_schedule.reload - expect(pipeline_schedule.next_run_at).to be > Time.now + expect(pipeline_schedule.next_run_at).to be > Time.current expect(pipeline_schedule).to eq(project.ci_pipelines.last.pipeline_schedule) expect(pipeline_schedule).to be_active end diff --git a/spec/workers/process_commit_worker_spec.rb b/spec/workers/process_commit_worker_spec.rb index d247668ac76..5cdb9836069 100644 --- a/spec/workers/process_commit_worker_spec.rb +++ b/spec/workers/process_commit_worker_spec.rb @@ -200,9 +200,9 @@ describe ProcessCommitWorker do it 'parses date strings into Time instances' do commit = worker.build_commit(project, id: '123', - authored_date: Time.now.to_s) + authored_date: Time.current.to_s) - expect(commit.authored_date).to be_an_instance_of(Time) + expect(commit.authored_date).to be_a_kind_of(Time) end end end diff --git a/spec/workers/repository_check/clear_worker_spec.rb b/spec/workers/repository_check/clear_worker_spec.rb index 7ad9e287204..40cf6abf508 100644 --- a/spec/workers/repository_check/clear_worker_spec.rb +++ b/spec/workers/repository_check/clear_worker_spec.rb @@ -7,7 +7,7 @@ describe RepositoryCheck::ClearWorker do project = create(:project) project.update_columns( last_repository_check_failed: true, - last_repository_check_at: Time.now + last_repository_check_at: Time.current ) described_class.new.perform diff --git a/spec/workers/repository_update_remote_mirror_worker_spec.rb b/spec/workers/repository_update_remote_mirror_worker_spec.rb index 7bc499d480d..b81b492167a 100644 --- a/spec/workers/repository_update_remote_mirror_worker_spec.rb +++ b/spec/workers/repository_update_remote_mirror_worker_spec.rb @@ -6,10 +6,10 @@ describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_state do subject { described_class.new } let(:remote_mirror) { create(:remote_mirror) } - let(:scheduled_time) { Time.now - 5.minutes } + let(:scheduled_time) { Time.current - 5.minutes } around do |example| - Timecop.freeze(Time.now) { example.run } + Timecop.freeze(Time.current) { example.run } end def expect_mirror_service_to_return(mirror, result, tries = 0) @@ -26,7 +26,7 @@ describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_state do end it 'does not do anything if the mirror was already updated' do - remote_mirror.update(last_update_started_at: Time.now, update_status: :finished) + remote_mirror.update(last_update_started_at: Time.current, update_status: :finished) expect(Projects::UpdateRemoteMirrorService).not_to receive(:new) @@ -48,7 +48,7 @@ describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_state do expect_next_instance_of(Projects::UpdateRemoteMirrorService) do |service| expect(service).to receive(:execute).with(remote_mirror, 1).and_raise('Unexpected!') end - expect { subject.perform(remote_mirror.id, Time.now, 1) }.to raise_error('Unexpected!') + expect { subject.perform(remote_mirror.id, Time.current, 1) }.to raise_error('Unexpected!') lease = Gitlab::ExclusiveLease.new("#{described_class.name}:#{remote_mirror.id}", timeout: 1.second) |