diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/lib/gitlab/git | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/lib/gitlab/git')
39 files changed, 97 insertions, 56 deletions
diff --git a/spec/lib/gitlab/git/attributes_at_ref_parser_spec.rb b/spec/lib/gitlab/git/attributes_at_ref_parser_spec.rb index 6c4f650fa83..96cd70b4ff1 100644 --- a/spec/lib/gitlab/git/attributes_at_ref_parser_spec.rb +++ b/spec/lib/gitlab/git/attributes_at_ref_parser_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::AttributesAtRefParser, :seed_helper do +RSpec.describe Gitlab::Git::AttributesAtRefParser, :seed_helper do let(:project) { create(:project, :repository) } let(:repository) { project.repository } diff --git a/spec/lib/gitlab/git/attributes_parser_spec.rb b/spec/lib/gitlab/git/attributes_parser_spec.rb index 45db4acd3ac..4bc39921e85 100644 --- a/spec/lib/gitlab/git/attributes_parser_spec.rb +++ b/spec/lib/gitlab/git/attributes_parser_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::AttributesParser, :seed_helper do +RSpec.describe Gitlab::Git::AttributesParser, :seed_helper do let(:attributes_path) { File.join(SEED_STORAGE_PATH, 'with-git-attributes.git', 'info', 'attributes') } let(:data) { File.read(attributes_path) } diff --git a/spec/lib/gitlab/git/blame_spec.rb b/spec/lib/gitlab/git/blame_spec.rb index 9b2d6fa3bcb..67d7b37dd45 100644 --- a/spec/lib/gitlab/git/blame_spec.rb +++ b/spec/lib/gitlab/git/blame_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::Git::Blame, :seed_helper do +RSpec.describe Gitlab::Git::Blame, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } let(:blame) do Gitlab::Git::Blame.new(repository, SeedRepo::Commit::ID, "CONTRIBUTING.md") diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb index 46d9b78c14b..fb4510a78de 100644 --- a/spec/lib/gitlab/git/blob_spec.rb +++ b/spec/lib/gitlab/git/blob_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::Git::Blob, :seed_helper do +RSpec.describe Gitlab::Git::Blob, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } let(:rugged) do Rugged::Repository.new(File.join(TestEnv.repos_path, TEST_REPO_PATH)) diff --git a/spec/lib/gitlab/git/branch_spec.rb b/spec/lib/gitlab/git/branch_spec.rb index cb3f4df2dbd..bac1b4c57f9 100644 --- a/spec/lib/gitlab/git/branch_spec.rb +++ b/spec/lib/gitlab/git/branch_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::Git::Branch, :seed_helper do +RSpec.describe Gitlab::Git::Branch, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } let(:rugged) do Rugged::Repository.new(File.join(TestEnv.repos_path, repository.relative_path)) diff --git a/spec/lib/gitlab/git/bundle_file_spec.rb b/spec/lib/gitlab/git/bundle_file_spec.rb index e88e163a03f..701febadc1b 100644 --- a/spec/lib/gitlab/git/bundle_file_spec.rb +++ b/spec/lib/gitlab/git/bundle_file_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::BundleFile do +RSpec.describe Gitlab::Git::BundleFile do describe '.check!' do let(:valid_bundle) { Tempfile.new } let(:valid_bundle_path) { valid_bundle.path } diff --git a/spec/lib/gitlab/git/changes_spec.rb b/spec/lib/gitlab/git/changes_spec.rb index 7f56d30cb48..310be7a3731 100644 --- a/spec/lib/gitlab/git/changes_spec.rb +++ b/spec/lib/gitlab/git/changes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::Changes do +RSpec.describe Gitlab::Git::Changes do let(:changes) { described_class.new } describe '#includes_branches?' do diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb index edd367673fb..666b49f27f7 100644 --- a/spec/lib/gitlab/git/commit_spec.rb +++ b/spec/lib/gitlab/git/commit_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::Git::Commit, :seed_helper do +RSpec.describe Gitlab::Git::Commit, :seed_helper do include GitHelpers let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } @@ -227,6 +227,34 @@ describe Gitlab::Git::Commit, :seed_helper do end end + context 'pathspec' do + let(:pathspec) { 'files/ruby/*' } + + context 'with default literal_pathspec value' do + it 'finds the seed commit' do + commit = described_class.last_for_path(repository, 'master', pathspec) + + expect(commit.id).to eq(SeedRepo::Commit::ID) + end + end + + context 'with literal_pathspec set to false' do + it 'finds the seed commit' do + commit = described_class.last_for_path(repository, 'master', pathspec, literal_pathspec: false) + + expect(commit.id).to eq(SeedRepo::Commit::ID) + end + end + + context 'with literal_pathspec set to true' do + it 'does not find the seed commit' do + commit = described_class.last_for_path(repository, 'master', pathspec, literal_pathspec: true) + + expect(commit).to be_nil + end + end + end + context 'ref + path' do subject { described_class.last_for_path(repository, SeedRepo::Commit::ID, 'encoding') } @@ -560,7 +588,7 @@ describe Gitlab::Git::Commit, :seed_helper do end skip 'move this test to gitaly-ruby' do - describe '#init_from_rugged' do + RSpec.describe '#init_from_rugged' do let(:gitlab_commit) { described_class.new(repository, rugged_commit) } subject { gitlab_commit } diff --git a/spec/lib/gitlab/git/compare_spec.rb b/spec/lib/gitlab/git/compare_spec.rb index 6136df57acb..51043355ede 100644 --- a/spec/lib/gitlab/git/compare_spec.rb +++ b/spec/lib/gitlab/git/compare_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::Git::Compare, :seed_helper do +RSpec.describe Gitlab::Git::Compare, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } let(:compare) { Gitlab::Git::Compare.new(repository, SeedRepo::BigCommit::ID, SeedRepo::Commit::ID, straight: false) } let(:compare_straight) { Gitlab::Git::Compare.new(repository, SeedRepo::BigCommit::ID, SeedRepo::Commit::ID, straight: true) } diff --git a/spec/lib/gitlab/git/conflict/file_spec.rb b/spec/lib/gitlab/git/conflict/file_spec.rb index 0ee9ff93e87..454a48a1d3a 100644 --- a/spec/lib/gitlab/git/conflict/file_spec.rb +++ b/spec/lib/gitlab/git/conflict/file_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::Conflict::File do +RSpec.describe Gitlab::Git::Conflict::File do let(:conflict) { { theirs: { path: 'foo', mode: 33188 }, ours: { path: 'foo', mode: 33188 } } } let(:invalid_content) { described_class.new(nil, nil, conflict, (+"a\xC4\xFC").force_encoding(Encoding::ASCII_8BIT)) } let(:valid_content) { described_class.new(nil, nil, conflict, (+"Espa\xC3\xB1a").force_encoding(Encoding::ASCII_8BIT)) } diff --git a/spec/lib/gitlab/git/conflict/parser_spec.rb b/spec/lib/gitlab/git/conflict/parser_spec.rb index 92ea44394b1..67bd48256ce 100644 --- a/spec/lib/gitlab/git/conflict/parser_spec.rb +++ b/spec/lib/gitlab/git/conflict/parser_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::Conflict::Parser do +RSpec.describe Gitlab::Git::Conflict::Parser do describe '.parse' do def parse_text(text) described_class.parse(text, our_path: 'README.md', their_path: 'README.md') diff --git a/spec/lib/gitlab/git/cross_repo_comparer_spec.rb b/spec/lib/gitlab/git/cross_repo_comparer_spec.rb index 8b37b6d1667..1c49486b7b1 100644 --- a/spec/lib/gitlab/git/cross_repo_comparer_spec.rb +++ b/spec/lib/gitlab/git/cross_repo_comparer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::CrossRepoComparer do +RSpec.describe Gitlab::Git::CrossRepoComparer do let(:source_project) { create(:project, :repository) } let(:target_project) { create(:project, :repository) } diff --git a/spec/lib/gitlab/git/diff_collection_spec.rb b/spec/lib/gitlab/git/diff_collection_spec.rb index 6aa4f884d20..6da07ce84a1 100644 --- a/spec/lib/gitlab/git/diff_collection_spec.rb +++ b/spec/lib/gitlab/git/diff_collection_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::DiffCollection, :seed_helper do +RSpec.describe Gitlab::Git::DiffCollection, :seed_helper do before do stub_const('MutatingConstantIterator', Class.new) diff --git a/spec/lib/gitlab/git/diff_spec.rb b/spec/lib/gitlab/git/diff_spec.rb index ff54d7fbcd3..91688c31f5e 100644 --- a/spec/lib/gitlab/git/diff_spec.rb +++ b/spec/lib/gitlab/git/diff_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::Git::Diff, :seed_helper do +RSpec.describe Gitlab::Git::Diff, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } let(:gitaly_diff) do Gitlab::GitalyClient::Diff.new( diff --git a/spec/lib/gitlab/git/diff_stats_collection_spec.rb b/spec/lib/gitlab/git/diff_stats_collection_spec.rb index 82d15a49062..f2fe03829be 100644 --- a/spec/lib/gitlab/git/diff_stats_collection_spec.rb +++ b/spec/lib/gitlab/git/diff_stats_collection_spec.rb @@ -2,13 +2,13 @@ require "spec_helper" -describe Gitlab::Git::DiffStatsCollection do +RSpec.describe Gitlab::Git::DiffStatsCollection do let(:stats_a) do - double(Gitaly::DiffStats, additions: 10, deletions: 15, path: 'foo') + Gitaly::DiffStats.new(additions: 10, deletions: 15, path: 'foo') end let(:stats_b) do - double(Gitaly::DiffStats, additions: 5, deletions: 1, path: 'bar') + Gitaly::DiffStats.new(additions: 5, deletions: 1, path: 'bar') end let(:diff_stats) { [stats_a, stats_b] } diff --git a/spec/lib/gitlab/git/gitmodules_parser_spec.rb b/spec/lib/gitlab/git/gitmodules_parser_spec.rb index 58d1d2c71da..0e386c7f3d1 100644 --- a/spec/lib/gitlab/git/gitmodules_parser_spec.rb +++ b/spec/lib/gitlab/git/gitmodules_parser_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::GitmodulesParser do +RSpec.describe Gitlab::Git::GitmodulesParser do it 'parses a .gitmodules file correctly' do data = <<~GITMODULES [submodule "vendor/libgit2"] diff --git a/spec/lib/gitlab/git/hook_env_spec.rb b/spec/lib/gitlab/git/hook_env_spec.rb index 22b016cee3e..c8f9218916e 100644 --- a/spec/lib/gitlab/git/hook_env_spec.rb +++ b/spec/lib/gitlab/git/hook_env_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::HookEnv do +RSpec.describe Gitlab::Git::HookEnv do let(:gl_repository) { 'project-123' } describe ".set" do diff --git a/spec/lib/gitlab/git/keep_around_spec.rb b/spec/lib/gitlab/git/keep_around_spec.rb index 04ccf86cd28..44c3caf3f8d 100644 --- a/spec/lib/gitlab/git/keep_around_spec.rb +++ b/spec/lib/gitlab/git/keep_around_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::KeepAround do +RSpec.describe Gitlab::Git::KeepAround do include RepoHelpers let(:repository) { create(:project, :repository).repository } diff --git a/spec/lib/gitlab/git/lfs_changes_spec.rb b/spec/lib/gitlab/git/lfs_changes_spec.rb index adc63401b89..286c5b98771 100644 --- a/spec/lib/gitlab/git/lfs_changes_spec.rb +++ b/spec/lib/gitlab/git/lfs_changes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::LfsChanges do +RSpec.describe Gitlab::Git::LfsChanges do let_it_be(:project) { create(:project, :repository) } let(:newrev) { '54fcc214b94e78d7a41a9a8fe6d87a5e59500e51' } let(:blob_object_id) { '0c304a93cb8430108629bbbcaa27db3343299bc0' } diff --git a/spec/lib/gitlab/git/lfs_pointer_file_spec.rb b/spec/lib/gitlab/git/lfs_pointer_file_spec.rb index 8bb26ed4854..f45c7cccca0 100644 --- a/spec/lib/gitlab/git/lfs_pointer_file_spec.rb +++ b/spec/lib/gitlab/git/lfs_pointer_file_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::LfsPointerFile do +RSpec.describe Gitlab::Git::LfsPointerFile do let(:data) { "1234\n" } subject { described_class.new(data) } diff --git a/spec/lib/gitlab/git/merge_base_spec.rb b/spec/lib/gitlab/git/merge_base_spec.rb index d92b13c5023..1410e44a220 100644 --- a/spec/lib/gitlab/git/merge_base_spec.rb +++ b/spec/lib/gitlab/git/merge_base_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::MergeBase do +RSpec.describe Gitlab::Git::MergeBase do let_it_be(:project) { create(:project, :repository) } let(:repository) { project.repository } diff --git a/spec/lib/gitlab/git/object_pool_spec.rb b/spec/lib/gitlab/git/object_pool_spec.rb index ebeb7b7b633..c8fbc674c73 100644 --- a/spec/lib/gitlab/git/object_pool_spec.rb +++ b/spec/lib/gitlab/git/object_pool_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::ObjectPool do +RSpec.describe Gitlab::Git::ObjectPool do include RepoHelpers let(:pool_repository) { create(:pool_repository) } diff --git a/spec/lib/gitlab/git/patches/collection_spec.rb b/spec/lib/gitlab/git/patches/collection_spec.rb index 080be141c59..eb92f4663c8 100644 --- a/spec/lib/gitlab/git/patches/collection_spec.rb +++ b/spec/lib/gitlab/git/patches/collection_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Gitlab::Git::Patches::Collection do +RSpec.describe Gitlab::Git::Patches::Collection do let(:patches_folder) { Rails.root.join('spec/fixtures/patchfiles') } let(:patch_content1) do File.read(File.join(patches_folder, "0001-This-does-not-apply-to-the-feature-branch.patch")) diff --git a/spec/lib/gitlab/git/patches/commit_patches_spec.rb b/spec/lib/gitlab/git/patches/commit_patches_spec.rb index 760112155ce..cd1e03a6de0 100644 --- a/spec/lib/gitlab/git/patches/commit_patches_spec.rb +++ b/spec/lib/gitlab/git/patches/commit_patches_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Gitlab::Git::Patches::CommitPatches do +RSpec.describe Gitlab::Git::Patches::CommitPatches do describe '#commit' do let(:patches) do patches_folder = Rails.root.join('spec/fixtures/patchfiles') diff --git a/spec/lib/gitlab/git/patches/patch_spec.rb b/spec/lib/gitlab/git/patches/patch_spec.rb index 7466e853b65..629f43d3636 100644 --- a/spec/lib/gitlab/git/patches/patch_spec.rb +++ b/spec/lib/gitlab/git/patches/patch_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Gitlab::Git::Patches::Patch do +RSpec.describe Gitlab::Git::Patches::Patch do let(:patches_folder) { Rails.root.join('spec/fixtures/patchfiles') } let(:patch_content) do File.read(File.join(patches_folder, "0001-This-does-not-apply-to-the-feature-branch.patch")) diff --git a/spec/lib/gitlab/git/pre_receive_error_spec.rb b/spec/lib/gitlab/git/pre_receive_error_spec.rb index cb539261671..bf4530c8945 100644 --- a/spec/lib/gitlab/git/pre_receive_error_spec.rb +++ b/spec/lib/gitlab/git/pre_receive_error_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::PreReceiveError do +RSpec.describe Gitlab::Git::PreReceiveError do Gitlab::Git::PreReceiveError::SAFE_MESSAGE_PREFIXES.each do |prefix| context "error messages prefixed with #{prefix}" do it 'accepts only errors lines with the prefix' do diff --git a/spec/lib/gitlab/git/push_spec.rb b/spec/lib/gitlab/git/push_spec.rb index c09e8a085df..0f52f10c0a6 100644 --- a/spec/lib/gitlab/git/push_spec.rb +++ b/spec/lib/gitlab/git/push_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::Push do +RSpec.describe Gitlab::Git::Push do let_it_be(:project) { create(:project, :repository) } let(:oldrev) { project.commit('HEAD~2').id } let(:newrev) { project.commit.id } diff --git a/spec/lib/gitlab/git/raw_diff_change_spec.rb b/spec/lib/gitlab/git/raw_diff_change_spec.rb index 79b2fc21011..f894ae1d98b 100644 --- a/spec/lib/gitlab/git/raw_diff_change_spec.rb +++ b/spec/lib/gitlab/git/raw_diff_change_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::RawDiffChange do +RSpec.describe Gitlab::Git::RawDiffChange do let(:raw_change) { } let(:change) { described_class.new(raw_change) } diff --git a/spec/lib/gitlab/git/remote_mirror_spec.rb b/spec/lib/gitlab/git/remote_mirror_spec.rb index edef91b8bc6..423c4aa9620 100644 --- a/spec/lib/gitlab/git/remote_mirror_spec.rb +++ b/spec/lib/gitlab/git/remote_mirror_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::RemoteMirror do +RSpec.describe Gitlab::Git::RemoteMirror do describe '#update' do let(:project) { create(:project, :repository) } let(:repository) { project.repository } diff --git a/spec/lib/gitlab/git/remote_repository_spec.rb b/spec/lib/gitlab/git/remote_repository_spec.rb index b53eee293f0..84c17234ae4 100644 --- a/spec/lib/gitlab/git/remote_repository_spec.rb +++ b/spec/lib/gitlab/git/remote_repository_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::RemoteRepository, :seed_helper do +RSpec.describe Gitlab::Git::RemoteRepository, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } subject { described_class.new(repository) } diff --git a/spec/lib/gitlab/git/repository_cleaner_spec.rb b/spec/lib/gitlab/git/repository_cleaner_spec.rb index b387d1033d3..9f1bf9e48ee 100644 --- a/spec/lib/gitlab/git/repository_cleaner_spec.rb +++ b/spec/lib/gitlab/git/repository_cleaner_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::RepositoryCleaner do +RSpec.describe Gitlab::Git::RepositoryCleaner do include HttpIOHelpers let(:project) { create(:project, :repository) } diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb index 183e6e8d044..e7f4573c95f 100644 --- a/spec/lib/gitlab/git/repository_spec.rb +++ b/spec/lib/gitlab/git/repository_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::Git::Repository, :seed_helper do +RSpec.describe Gitlab::Git::Repository, :seed_helper do include Gitlab::EncodingHelper include RepoHelpers using RSpec::Parameterized::TableSyntax @@ -2187,34 +2187,47 @@ describe Gitlab::Git::Repository, :seed_helper do 'gitaly_address' => Gitlab.config.repositories.storages.default.gitaly_address, 'path' => TestEnv::SECOND_STORAGE_PATH }) - new_repository.create_repository end after do new_repository.remove end - it 'mirrors the source repository' do - subject + context 'destination does not exist' do + it 'mirrors the source repository' do + subject - expect(refs(new_repository_path)).to eq(refs(repository_path)) + expect(refs(new_repository_path)).to eq(refs(repository_path)) + end end - context 'with keep-around refs' do - let(:sha) { SeedRepo::Commit::ID } - let(:keep_around_ref) { "refs/keep-around/#{sha}" } - let(:tmp_ref) { "refs/tmp/#{SecureRandom.hex}" } - + context 'destination exists' do before do - repository.write_ref(keep_around_ref, sha) - repository.write_ref(tmp_ref, sha) + new_repository.create_repository end - it 'includes the temporary and keep-around refs' do + it 'mirrors the source repository' do subject - expect(refs(new_repository_path)).to include(keep_around_ref) - expect(refs(new_repository_path)).to include(tmp_ref) + expect(refs(new_repository_path)).to eq(refs(repository_path)) + end + + context 'with keep-around refs' do + let(:sha) { SeedRepo::Commit::ID } + let(:keep_around_ref) { "refs/keep-around/#{sha}" } + let(:tmp_ref) { "refs/tmp/#{SecureRandom.hex}" } + + before do + repository.write_ref(keep_around_ref, sha) + repository.write_ref(tmp_ref, sha) + end + + it 'includes the temporary and keep-around refs' do + subject + + expect(refs(new_repository_path)).to include(keep_around_ref) + expect(refs(new_repository_path)).to include(tmp_ref) + end end end end diff --git a/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb b/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb index 8339006fe9f..4f6a3fb823e 100644 --- a/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb +++ b/spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require 'json' require 'tempfile' -describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do +RSpec.describe Gitlab::Git::RuggedImpl::UseRugged, :seed_helper do let(:project) { create(:project, :repository) } let(:repository) { project.repository } let(:feature_flag_name) { 'feature-flag-name' } diff --git a/spec/lib/gitlab/git/tag_spec.rb b/spec/lib/gitlab/git/tag_spec.rb index 6d3b239c38f..f83ccc6cae0 100644 --- a/spec/lib/gitlab/git/tag_spec.rb +++ b/spec/lib/gitlab/git/tag_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::Git::Tag, :seed_helper do +RSpec.describe Gitlab::Git::Tag, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } describe '#tags' do diff --git a/spec/lib/gitlab/git/tree_spec.rb b/spec/lib/gitlab/git/tree_spec.rb index b254dd3f036..5ef964ac3c1 100644 --- a/spec/lib/gitlab/git/tree_spec.rb +++ b/spec/lib/gitlab/git/tree_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::Git::Tree, :seed_helper do +RSpec.describe Gitlab::Git::Tree, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } shared_examples :repo do diff --git a/spec/lib/gitlab/git/user_spec.rb b/spec/lib/gitlab/git/user_spec.rb index 6761413320a..4414195ebf4 100644 --- a/spec/lib/gitlab/git/user_spec.rb +++ b/spec/lib/gitlab/git/user_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::User do +RSpec.describe Gitlab::Git::User do let(:username) { 'janedoe' } let(:name) { 'Jane DoƩ' } let(:email) { 'janedoƩ@example.com' } diff --git a/spec/lib/gitlab/git/util_spec.rb b/spec/lib/gitlab/git/util_spec.rb index 81918f036f9..a0237c821b5 100644 --- a/spec/lib/gitlab/git/util_spec.rb +++ b/spec/lib/gitlab/git/util_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::Util do +RSpec.describe Gitlab::Git::Util do describe '#count_lines' do [ ["", 0], diff --git a/spec/lib/gitlab/git/wiki_spec.rb b/spec/lib/gitlab/git/wiki_spec.rb index 8bae2e8125e..a88097705f6 100644 --- a/spec/lib/gitlab/git/wiki_spec.rb +++ b/spec/lib/gitlab/git/wiki_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::Wiki do +RSpec.describe Gitlab::Git::Wiki do using RSpec::Parameterized::TableSyntax let(:project) { create(:project) } diff --git a/spec/lib/gitlab/git/wraps_gitaly_errors_spec.rb b/spec/lib/gitlab/git/wraps_gitaly_errors_spec.rb index a4489cca443..e448277b307 100644 --- a/spec/lib/gitlab/git/wraps_gitaly_errors_spec.rb +++ b/spec/lib/gitlab/git/wraps_gitaly_errors_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::Git::WrapsGitalyErrors do +RSpec.describe Gitlab::Git::WrapsGitalyErrors do subject(:wrapper) do klazz = Class.new { include Gitlab::Git::WrapsGitalyErrors } klazz.new |